diff --git a/build/binutils/build-arch-aarch64.sh b/build/binutils/build-arch-aarch64.sh index 594b4719f1..8b68b96e70 100755 --- a/build/binutils/build-arch-aarch64.sh +++ b/build/binutils/build-arch-aarch64.sh @@ -48,7 +48,7 @@ export AS_FOR_BUILD=/opt/cross/$ARCH/bin/$TRIPLET-as export AR_FOR_BUILD=/opt/cross/$ARCH/bin/$TRIPLET-ar export LD_FOR_TARGET=/bin/ld export CFLAGS_FOR_TARGET="-mno-outline-atomics -mtls-dialect=trad" -export CXXFLAGS_FOR_TARGET="-mno-outline-atomics -mtls-dialect=trad" +export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET" export STRIP="/usr/bin/strip -x" export STRIP_FOR_TARGET="$STRIP" @@ -74,9 +74,8 @@ CONFIGURE_OPTS=" --with-system-zlib " -# gdb doesn't currently build for aarch64 due to an issue in the bison -# generated code that narrows int to char, which is unsigned. -CONFIGURE_OPTS+=" --disable-gdb" +CFLAGS+=" $CFLAGS_FOR_TARGET" +CXXFLAGS+=" $CFLAGS_FOR_TARGET" build_init() { typeset d=${SYSROOT[$ARCH]}/usr diff --git a/build/binutils/local.mog b/build/binutils/local.mog index 51dae70ca5..4a7355546e 100644 --- a/build/binutils/local.mog +++ b/build/binutils/local.mog @@ -21,5 +21,7 @@ dir group=bin mode=0755 owner=root path=usr/sfw/bin emit \ link path=usr/gnu/bin/%<1> target=../../bin/g%<1> > +$(aarch64_ONLY)link path=usr/bin/gdb target=ggdb + drop>