linux_dsm_epyc7002/arch/mips
Nathan Chancellor fd9d0ca2cc MIPS: Unconditionally specify '-EB' or '-EL'
This was all done to work around a GCC bug that has been fixed after
4.2. The kernel requires GCC 4.6 or newer so remove all of these hacks
and just use the traditional flags.

 $ mips64-linux-gcc --version | head -n1
 mips64-linux-gcc (GCC) 4.6.3

 $ mips64-linux-gcc -EB -dM -E -C -x c /dev/null | grep MIPSE
 #define MIPSEB 1
 #define __MIPSEB__ 1
 #define _MIPSEB 1
 #define __MIPSEB 1

 $ mips64-linux-gcc -EL -dM -E -C -x c /dev/null | grep MIPSE
 #define __MIPSEL__ 1
 #define MIPSEL 1
 #define _MIPSEL 1
 #define __MIPSEL 1

This is necessary when converting the MIPS VDSO to use $(LD) instead of
$(CC) to link because the OUTPUT_FORMAT is defaulted to little endian
and only flips to big endian when '-EB' is set on the command line.
There is no issue currently because the compiler explicitly passes
'-EB' or '-EL' to the linker regardless of whether or not it was
provided by the user. Passing '-v' to VDSO_LDFLAGS shows:

<gcc_prefix>/libexec/gcc/mips64-linux/9.3.0/collect2 ... -EB ...

even though '-EB' is nowhere to be found in KBUILD_CFLAGS. The VDSO
Makefile already supports getting '-EB' or '-EL' from KBUILD_CFLAGS
through a filter directive but '-EB' or '-EL' is not always present.

If we do not do this, we will see the following error when compiling
for big endian:

$ make -j$(nproc) ARCH=mips CROSS_COMPILE=mips64-linux- \
  64r2el_defconfig arch/mips/vdso/
...
mips64-linux-ld: arch/mips/vdso/elf.o: compiled for a big endian system
and target is little endian
mips64-linux-ld: arch/mips/vdso/elf.o: endianness incompatible with that
of the selected emulation
mips64-linux-ld: failed to merge target specific data of file
arch/mips/vdso/elf.o
...

Remove this legacy hack and just use '-EB' and '-EL' unconditionally.

Reported-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2020-05-12 10:01:53 +02:00
..
alchemy MIPS: Use fallthrough for arch/mips 2020-05-07 11:55:47 +02:00
ar7 MIPS: Use fallthrough for arch/mips 2020-05-07 11:55:47 +02:00
ath25 MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
ath79 MIPS: Use fallthrough for arch/mips 2020-05-07 11:55:47 +02:00
bcm47xx MIPS: BCM47XX: Add support for Netgear R6200 V1 2019-07-25 22:10:05 -07:00
bcm63xx MIPS: Use fallthrough for arch/mips 2020-05-07 11:55:47 +02:00
bmips MIPS: BMIPS: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-19 10:36:02 -08:00
boot MIPS: Truncate link address into 32bit for 32bit kernel 2020-05-07 10:31:01 +02:00
cavium-octeon MIPS: Use fallthrough for arch/mips 2020-05-07 11:55:47 +02:00
cobalt MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
configs MIPS: Remove NEC MARKEINS/EMMA 2020-05-09 18:05:57 +02:00
crypto crypto: {arm,arm64,mips}/poly1305 - remove redundant non-reduction from emit 2020-01-16 15:18:12 +08:00
dec MIPS: asm: Rename some macros to avoid build errors 2020-05-07 13:20:05 +02:00
fw MIPS: CFE: Remove dead code in cfe_getfwinfo() 2020-05-07 10:29:42 +02:00
generic MIPS: generic: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-19 10:36:07 -08:00
include MIPS: Remove NEC MARKEINS/EMMA 2020-05-09 18:05:57 +02:00
jazz MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
jz4740 MIPS: ingenic: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-05-07 11:59:55 +02:00
kernel MIPS: Replace zero-length array with flexible-array 2020-05-08 12:01:02 +02:00
kvm MIPS: Use fallthrough for arch/mips 2020-05-07 11:55:47 +02:00
lantiq remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
lib MIPS: do not compile generic functions for CONFIG_CAVIUM_OCTEON_SOC 2020-03-25 16:07:13 +01:00
loongson2ef mips: loongsoon2ef: remove private clk api 2020-04-16 17:34:23 +02:00
loongson32 MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
loongson64 MIPS: Loongson: Add DMA support for LS7A 2020-05-08 12:00:07 +02:00
math-emu MIPS: Use fallthrough for arch/mips 2020-05-07 11:55:47 +02:00
mm MIPS: unexport __flush_icache_user_range 2020-05-11 17:59:47 +02:00
mti-malta MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
net MIPS: BPF: Use sizeof_field() instead of FIELD_SIZEOF() 2020-01-10 11:33:35 -08:00
netlogic MIPS: Netlogic: remove unneeded semicolon in fmn_message_handler() 2020-04-19 16:05:19 +02:00
oprofile MIPS: Use fallthrough for arch/mips 2020-05-07 11:55:47 +02:00
paravirt mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
pci MIPS: Remove NEC MARKEINS/EMMA 2020-05-09 18:05:57 +02:00
pic32 MIPS: pic32mzda: Drop pointless static qualifier 2020-02-28 12:44:39 +01:00
pistachio MIPS: Pistachio: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-19 10:36:21 -08:00
pnx833x A batch of MIPS fixes: 2019-06-08 13:09:31 -07:00
power mips: check for dsp presence only once before save/restore 2019-10-07 10:58:53 -07:00
ralink MIPS: ralink: mt7621: Fix soc_device introduction 2020-03-28 17:26:36 +01:00
rb532 remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
sgi-ip22 MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
sgi-ip27 mfd: ioc3: Add driver for SGI IOC3 chip 2020-01-09 15:30:59 -08:00
sgi-ip30 MIPS: SGI-IP30: Check for valid pointer before using it 2020-01-22 10:15:45 -08:00
sgi-ip32 MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
sibyte treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
sni MIPS: pass non-NULL dev_id on shared request_irq() 2020-03-16 16:04:49 +01:00
tools MIPS: tools: Move "returns" after "loongson3-llsc-check" 2020-05-04 10:18:41 +02:00
txx9 MIPS: TXx9: Fix Kconfig warnings 2020-04-14 12:52:28 +02:00
vdso MIPS: VDSO: Move disabling the VDSO logic to Kconfig 2020-05-12 10:01:45 +02:00
vr41xx MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
Kbuild.platforms MIPS: Remove NEC MARKEINS/EMMA 2020-05-09 18:05:57 +02:00
Kconfig MIPS: VDSO: Move disabling the VDSO logic to Kconfig 2020-05-12 10:01:45 +02:00
Kconfig.debug MIPS: cmdline: Remove redundant Kconfig defaults 2019-10-09 15:53:16 -07:00
Makefile MIPS: Unconditionally specify '-EB' or '-EL' 2020-05-12 10:01:53 +02:00
Makefile.postlink MIPS: fix indentation of the 'RELOCS' message 2020-01-20 15:37:30 -08:00