Building a master as of this writing with the trunk Clang on ppc64le (POWER8) fails:
CC init/version.o
AR init/built-in.a
LD vmlinux.o
MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x2944): Section mismatch in reference from the variable __boot_from_prom to the function .init.text:prom_init()
The function __boot_from_prom() references
the function __init prom_init().
This is often because __boot_from_prom lacks a __init
annotation or the annotation of prom_init is wrong.
WARNING: vmlinux.o(.text+0x2c34): Section mismatch in reference from the variable start_here_multiplatform to the function .init.text:early_setup()
The function start_here_multiplatform() references
the function __init early_setup().
This is often because start_here_multiplatform lacks a __init
annotation or the annotation of early_setup is wrong.
WARNING: vmlinux.o(.text+0x2c68): Section mismatch in reference from the variable start_here_common to the function .init.text:start_kernel()
The function start_here_common() references
the function __init start_kernel().
This is often because start_here_common lacks a __init
annotation or the annotation of start_kernel is wrong.
arch/powerpc/kernel/irq.o: In function `bitmap_equal':
/p/project/cpcp0/pcp0151/projects/linux/./include/linux/bitmap.h:320: undefined reference to `bcmp'
arch/powerpc/kernel/rtas.o: In function `bitmap_equal':
/p/project/cpcp0/pcp0151/projects/linux/./include/linux/bitmap.h:320: undefined reference to `bcmp'
arch/powerpc/kernel/smp.o: In function `bitmap_equal':
/p/project/cpcp0/pcp0151/projects/linux/./include/linux/bitmap.h:320: undefined reference to `bcmp'
arch/powerpc/sysdev/xics/xics-common.o: In function `bitmap_equal':
/p/project/cpcp0/pcp0151/projects/linux/./include/linux/bitmap.h:320: undefined reference to `bcmp'
arch/powerpc/platforms/pseries/hotplug-memory.o: In function `find_aa_index':
/p/project/cpcp0/pcp0151/projects/linux/arch/powerpc/platforms/pseries/hotplug-memory.c:128: undefined reference to `bcmp'
kernel/workqueue.o:/p/project/cpcp0/pcp0151/projects/linux/./include/linux/bitmap.h:320: more undefined references to `bcmp' follow
make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2
What config?
Two of those three warnings are #272 and #273 . Those should be relatively easy bugs to fix if you're looking for a good place to start.
arch/powerpc/kernel/irq.o: In function
bitmap_equal': /p/project/cpcp0/pcp0151/projects/linux/./include/linux/bitmap.h:320: undefined reference tobcmp'
Sounds like more object files aren't linking against lib/string.o.
Using Clang 8.0.1 against defconfig on ppc64le went fine, so something
wrong with the trunk Clang then.
On Fri, Sep 20, 2019 at 1:40 AM Nick Desaulniers notifications@github.com
wrote:
Two of those three warnings are #272
https://github.com/ClangBuiltLinux/linux/issues/272 and #273
https://github.com/ClangBuiltLinux/linux/issues/273 . Those should be
relatively easy bugs to fix if you're looking for a good place to start.arch/powerpc/kernel/irq.o: In function bitmap_equal':
/p/project/cpcp0/pcp0151/projects/linux/./include/linux/bitmap.h:320:
undefined reference to bcmp'Sounds like more object files aren't linking against lib/string.o.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ClangBuiltLinux/linux/issues/661?email_source=notifications&email_token=AAHLBZZ6BAQQE4GCIOQOPSTQKOTPFA5CNFSM4IYIFZ4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7EDBQQ#issuecomment-533213378,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHLBZZTJR4RSG6INSN2O2LQKOTPFANCNFSM4IYIFZ4A
.
It’s probably related to #647.
@ikitayama what config is this? I'd like to try to reproduce this locally; hopefully it is reproducible on a cross compile build because I don't know of any way to get access to Power hardware...
defconfig if I’m not largely mistaken.
On Fri, Sep 20, 2019 at 11:09 Nathan Chancellor notifications@github.com
wrote:
@ikitayama https://github.com/ikitayama what config is this? I'd like
to try to reproduce this locally; hopefully it is reproducible on a cross
compile build because I don't know of any way to get access to Power
hardware...—
You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub
https://github.com/ClangBuiltLinux/linux/issues/661?email_source=notifications&email_token=AAHLBZ44QPKE7UAZ6FPVJZ3QKQWEZA5CNFSM4IYIFZ4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7FKJ6Y#issuecomment-533374203,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHLBZ7XT3ELGTE6KZL4V5TQKQWEZANCNFSM4IYIFZ4A
.
So I would assume that means ppc64le_defconfig? I can build that config just fine on my x86 box...
I was launching a build this way
make CC=clang defconfig
On Fri, Sep 20, 2019 at 15:49 Nathan Chancellor notifications@github.com
wrote:
So I would assume that means ppc64le_defconfig? I can build that config
just fine on my x86 box...—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ClangBuiltLinux/linux/issues/661?email_source=notifications&email_token=AAHLBZ4MLVEBL4E2VMP2IODQKRW7XA5CNFSM4IYIFZ4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7FYHHY#issuecomment-533431199,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHLBZ64PROUQBQCA5N73CDQKRW7XANCNFSM4IYIFZ4A
.
According to arch/powerpc/Makefile, defconfig evaluates to whatever $(uname -m)_defconfig evaluates to:
So if this is on a ppc64le machine, I would expect that to be ppc64le_defconfig.
This is new, perhaps.
In file included from arch/powerpc/kernel/crash.c:28:
./arch/powerpc/include/asm/setjmp.h:15:13: error: declaration of built-in function 'setjmp' requires the declaration of the 'jmp_buf' type, commonly provided in the header <setjmp.h>. [-Werror,-Wincomplete-setjmp-declaration]
extern long setjmp(long *);
^
./arch/powerpc/include/asm/setjmp.h:16:13: error: declaration of built-in function 'longjmp' requires the declaration of the 'jmp_buf' type, commonly provided in the header <setjmp.h>. [-Werror,-Wincomplete-setjmp-declaration]
extern void longjmp(long *, long);
^
2 errors generated.
make[3]: *** [arch/powerpc/kernel/crash.o] Error 1
make[2]: *** [arch/powerpc/kernel] Error 2
make[1]: *** [arch/powerpc] Error 2
make: *** [sub-make] Error 2
As I keep building trunk Clang on POWER8 and building an updated master branch of linux, I am
not so sure how I report the issues I encounter everyday on this non-mainline architecture.
That is being tracked in #625.
Is this deserved to be a new Issue?
ld.lld: error: can't create dynamic relocation R_PPC64_ADDR64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in init/built-in.a(do_mounts_rd.o)
>>> referenced by do_mounts_rd.c
>>> do_mounts_rd.o:(__mcount_loc+0x0) in archive init/built-in.a
ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2
I get a slew of theses.
As of today's master branch of the kernel builds fine with trunk Clang on POWER8.
Closing.
ld.lld: error: can't create dynamic relocation R_PPC64_ADDR64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
I'm also seeing a bunch of errors like these - did you do anything to fix them?
If we use ld, the kernel can build.
On Sat, Dec 14, 2019 at 18:53 Ilie Halip notifications@github.com wrote:
ld.lld: error: can't create dynamic relocation R_PPC64_ADDR64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
I'm also seeing a bunch of errors like these - did you do anything to fix
them?—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/ClangBuiltLinux/linux/issues/661?email_source=notifications&email_token=AAHLBZ5DDRAENEB5ZMCXWMLQYSUIRA5CNFSM4IYIFZ4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG37BLI#issuecomment-565702829,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAHLBZ5HGUJXWNJGOZXNJVLQYSUIRANCNFSM4IYIFZ4A
.
Most helpful comment
As of today's master branch of the kernel builds fine with trunk Clang on POWER8.