aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorIdwer Vollering <vidwer@gmail.com>2015-04-09 15:34:07 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-04-29 14:42:37 +0200
commit1b7c9590f4bcbb82cbea7cdbbf9d423086c96b35 (patch)
tree3bf749b62390b0c2844b3ed80da376cfe375bb40 /util
parent815f4bfbbd96b80ae1f6dc1069300f48b9f7c851 (diff)
downloadcoreboot-1b7c9590f4bcbb82cbea7cdbbf9d423086c96b35.tar.gz
coreboot-1b7c9590f4bcbb82cbea7cdbbf9d423086c96b35.tar.xz
coreboot-1b7c9590f4bcbb82cbea7cdbbf9d423086c96b35.zip
crossgcc: don't use libdl while building GDB on FreeBSD
Since FreeBSD doesn't have libdl, these errors are shown: - config.log: /usr/bin/ld: cannot find -ldl - crossgcc-build.log: configure: error: C compiler cannot create executables Conditionally pass the presence of libdl in LDFLAGS. Change-Id: I79c48da7e6700a4606c9e0c1314241db8997d3f3 Signed-off-by: Idwer Vollering <vidwer@gmail.com> Reviewed-on: http://review.coreboot.org/2342 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util')
-rwxr-xr-xutil/crossgcc/buildgcc5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index ae581b9dd..f2faefb56 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -583,8 +583,11 @@ printf "Building GDB ${GDB_VERSION} ... "
cd ${BUILDDIRPREFIX}-gdb
export PYTHONHOME=$DESTDIR$TARGETDIR
rm -f .failed
+ if [ $(uname) != "FreeBSD" -a $(uname) != "NetBSD" ]; then
+ LIBDL="-ldl"
+ fi
LDFLAGS="-Wl,-rpath,\$\$ORIGIN/../lib/ -L$DESTDIR$TARGETDIR/lib \
- -lpthread -ldl -lutil" \
+ -lpthread $LIBDL -lutil" \
CC="$CC" CFLAGS="$HOSTCFLAGS -I$DESTDIR$TARGETDIR/include" \
../gdb-${GDB_VERSION}/configure --prefix=$TARGETDIR \
--target=${TARGETARCH} --disable-werror --disable-nls