diff options
author | Alexey Brodkin <abrodkin@synopsys.com> | 2018-06-01 13:34:33 +0200 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2018-06-14 02:46:34 +0200 |
commit | 74c11e300c103af47db5b658fdcf28002421e250 (patch) | |
tree | 0aaafe27b37fef54e16dd2f3a7a8a95dd50d0eb2 /Documentation/sh | |
parent | Linux 4.17 (diff) | |
download | linux-74c11e300c103af47db5b658fdcf28002421e250.tar.xz linux-74c11e300c103af47db5b658fdcf28002421e250.zip |
ARC: Explicitly add -mmedium-calls to CFLAGS
GCC built for arc*-*-linux has "-mmedium-calls" implicitly enabled by default
thus we don't see any problems during Linux kernel compilation.
----------------------------->8------------------------
arc-linux-gcc -mcpu=arc700 -Q --help=target | grep calls
-mlong-calls [disabled]
-mmedium-calls [enabled]
----------------------------->8------------------------
But if we try to use so-called Elf32 toolchain with GCC configured for
arc*-*-elf* then we'd see the following failure:
----------------------------->8------------------------
init/do_mounts.o: In function 'init_rootfs':
do_mounts.c:(.init.text+0x108): relocation truncated to fit: R_ARC_S21W_PCREL
against symbol 'unregister_filesystem' defined in .text section in fs/filesystems.o
arc-elf32-ld: final link failed: Symbol needs debug section which does not exist
make: *** [vmlinux] Error 1
----------------------------->8------------------------
That happens because neither "-mmedium-calls" nor "-mlong-calls" are enabled in
Elf32 GCC:
----------------------------->8------------------------
arc-elf32-gcc -mcpu=arc700 -Q --help=target | grep calls
-mlong-calls [disabled]
-mmedium-calls [disabled]
----------------------------->8------------------------
Now to make it possible to use Elf32 toolchain for building Linux kernel
we're explicitly add "-mmedium-calls" to CFLAGS.
And since we add "-mmedium-calls" to the global CFLAGS there's no point in
having per-file copies thus removing them.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'Documentation/sh')
0 files changed, 0 insertions, 0 deletions