diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-10-29 23:21:19 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-10-29 23:21:19 +0000 |
commit | 8330521d9b370bad4b804d7fb6dfeb9ed8aafc2c (patch) | |
tree | 40384032ce79ce82c6254ff8830c7e58310274b8 /tools | |
parent | d00ae5af737aa553cb4e6d903eda0537086776bb (diff) | |
download | s6-networking-8330521d9b370bad4b804d7fb6dfeb9ed8aafc2c.tar.xz |
Support default pie
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/gen-deps.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/gen-deps.sh b/tools/gen-deps.sh index 4eb487e..67ec2d4 100755 --- a/tools/gen-deps.sh +++ b/tools/gen-deps.sh @@ -59,13 +59,17 @@ for dir in $(ls -1 src | grep -v ^include) ; do deps= libs= while read dep ; do - if echo $dep | grep -q -e ^-l -e '^\${LIB.*}$' -e '^\${.*_LIB}$' ; then + if echo $dep | grep -q -e ^-l -e '^\${.*_LIB}' ; then libs="$libs $dep" else deps="$deps src/$dir/$dep" fi done < src/$dir/deps-lib/$file + echo 'ifeq ($(strip $(DEFAULT_PIE)),)' echo "lib${file}.a.xyzzy:$deps" + echo else + echo "lib${file}.a.xyzzy:$(echo "$deps" | sed 's/\.o/.lo/g')" + echo endif echo "lib${file}.so.xyzzy: EXTRA_LIBS :=$libs" echo "lib${file}.so.xyzzy:$(echo "$deps" | sed 's/\.o/.lo/g')" done @@ -77,7 +81,7 @@ for dir in $(ls -1 src | grep -v ^include) ; do if echo $dep | grep -q -- \\.o$ ; then dep="src/$dir/$dep" fi - if echo $dep | grep -q -- '^\${.*_LIB}$' ; then + if echo $dep | grep -q -- '^\${.*_LIB}' ; then libs="$libs $dep" else deps="$deps $dep" |