don't barf on the flag when we see it. This makes porting efforts easier.
As a sanity check, make sure we see the -shared-lib-id flag when creating
a shared library.
Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
LDSCRIPTPATH="@binutils_ldscript_dir@" # and the scripts
SHARED_ID=""
NEWLDSCRIPT=""
+WANT_SHARED=""
# check TOOLDIR from prefix/bin/ or prefix/target-alias/bin/
[ -d "${LDSCRIPTPATH}" ] || LDSCRIPTPATH="${TOOLDIR}/../lib"
-shared-lib-id)
shift; SHARED_ID="$1";; # Shared library ID
+ -shared|-G)
+ WANT_SHARED="y";; # Shared library
-o) shift; OFILE="$1";; # the final outfile
-o*) OFILE="`expr \"$1\" : '-o\(.*\)'`";;
shift
done
+ if [ "$WANT_SHARED" = "y" ]
+ then
+ if [ -z "$SHARED_ID" ]
+ then
+ echo "-shared used without passing a shared library ID"
+ exit 1
+ fi
+ fi
if [ "$FINAL" = "yes" ]
then
[ "$VERBOSE" = "y" ] && set -x