Message ID | nycvar.YSQ.7.76.1802202213560.31644@knanqh.ubzr (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Feb 21, 2018 at 4:15 AM, Nicolas Pitre <nicolas.pitre@linaro.org> wrote: > On Tue, 20 Feb 2018, Arnd Bergmann wrote: > >> We need some way to pass -mbig-endian to the linker during the >> LTO link stage, otherwise we get a waning like >> >> arm-linux-gnueabi/bin/ld: arch/arm/lib/clearbit.o: compiled for a big endian system and target is little endian >> >> for each file we link in. >> >> There is probably a better method of passing that flag, I'm just >> adding it to a different hack that I added earlier for x86 LTO >> here. > > Didn't the patch below fix it for you already? I think the problem here is that -mbig-endian is part of KBUILD_CPPFLAGS, not KBUILD_CFLAGS. We add the latter to the gcc-ld command line, but not the former. Arnd
diff --git a/scripts/gcc-ld b/scripts/gcc-ld index d95dd0be38..fa53be2a34 100755 --- a/scripts/gcc-ld +++ b/scripts/gcc-ld @@ -27,4 +27,10 @@ while [ "$1" != "" ] ; do shift done -exec $CC $ARGS +case "${KBUILD_VERBOSE}" in +*1*) + set -x + ;; +esac + +exec $CC $KBUILD_CFLAGS $ARGS