Skip to content

Commit

Permalink
Fix lib flags on update_engine scons file.
Browse files Browse the repository at this point in the history
env['LIBS'] defines the list libraries that the binaries will be
linked against, passing -l and the name of the library. Instead of
hardcoding the library names, we use pkg-config when available.

BUG=None
TEST=emerge-link update_engine ; sudo emerge update_engine
TEST=Manually checked pkg-config for each one of the packages and compared with the former list.

Change-Id: Ie962cac297d2b9eb41fb244b9edfb1e693e81523
Reviewed-on: https://chromium-review.googlesource.com/203335
Tested-by: Alex Deymo <[email protected]>
Reviewed-by: Alex Deymo <[email protected]>
Commit-Queue: Alex Deymo <[email protected]>
  • Loading branch information
deymo authored and chrome-internal-fetch committed Jun 15, 2014
1 parent d1c4d2d commit b683327
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,11 @@ env['CCFLAGS'] += env['CFLAGS']

BASE_VER = os.environ.get('BASE_VER', '271506')
env['LIBS'] = Split("""bz2
crypto
curl
ext2fs
gflags
glib-2.0
gthread-2.0
metrics-%s
policy-%s
protobuf
pthread
rootdev
rt
ssl
vboot_host
xml2""" % (BASE_VER, BASE_VER))
vboot_host""" % (BASE_VER,))
env['CPPPATH'] = ['..']
env['BUILDERS']['ProtocolBuffer'] = proto_builder
env['BUILDERS']['DbusBindings'] = dbus_bindings_builder
Expand All @@ -181,9 +171,22 @@ for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH'):

pkgconfig = os.environ.get('PKG_CONFIG', 'pkg-config')

env.ParseConfig(pkgconfig + ' --cflags --libs '
'dbus-1 dbus-glib-1 gio-2.0 gio-unix-2.0 glib-2.0 libchrome-%s '
'libchromeos-%s libxml-2.0' % (BASE_VER, BASE_VER))
env.ParseConfig(pkgconfig + ' --cflags --libs ' + ' '.join((
'dbus-1',
'dbus-glib-1',
'ext2fs',
'gio-2.0',
'gio-unix-2.0',
'glib-2.0',
'gthread-2.0',
'libchrome-%s' % BASE_VER,
'libchromeos-%s' % BASE_VER,
'libcrypto',
'libcurl',
'libmetrics-%s' % BASE_VER,
'libssl',
'libxml-2.0',
'protobuf')))
env.ProtocolBuffer('update_metadata.pb.cc', 'update_metadata.proto')
env.PublicKey('unittest_key.pub.pem', 'unittest_key.pem')
env.PublicKey('unittest_key2.pub.pem', 'unittest_key2.pem')
Expand Down

0 comments on commit b683327

Please sign in to comment.