Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: unsupported argument '-mimplicit-it=always' to option 'Wa,' #858

Closed
agners opened this issue Feb 7, 2020 · 2 comments
Closed

error: unsupported argument '-mimplicit-it=always' to option 'Wa,' #858

agners opened this issue Feb 7, 2020 · 2 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@agners
Copy link

agners commented Feb 7, 2020

Trying to use AS=clang and CONFIG_THUMB2_KERNEL=y leads to the following errors:

clang-10: error: unsupported argument '-mimplicit-it=always' to option 'Wa,'
make[1]: *** [scripts/Makefile.build:266: scripts/mod/empty.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1112: prepare0] Error 2

This is due to the kernel build system tries to pass -mimplicit-it=always by using -Wa.

@agners agners added [BUG] linux A bug that should be fixed in the mainline kernel. [PATCH] Exists There is a patch that fixes this issue [ARCH] arm32 This bug impacts ARCH=arm labels Feb 7, 2020
@agners
Copy link
Author

agners commented Feb 7, 2020

That can be fixed by using -mimplicit-it=always for Clang instead. This of course needs to be done compiler specific. I will come up with a patch for this.

--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -123,7 +123,8 @@ endif
 AFLAGS_NOWARN  :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W)
 
 ifeq ($(CONFIG_THUMB2_KERNEL),y)
-CFLAGS_ISA     :=-mthumb -Wa,-mimplicit-it=always $(AFLAGS_NOWARN)
+CFLAGS_ISA     :=-mthumb -mimplicit-it=always
 AFLAGS_ISA     :=$(CFLAGS_ISA) -Wa$(comma)-mthumb
 # Work around buggy relocation from gas if requested:
 ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y)

@nickdesaulniers
Copy link
Member

duping to #1270

@nickdesaulniers nickdesaulniers added duplicate This issue or pull request already exists and removed [ARCH] arm32 This bug impacts ARCH=arm [BUG] linux A bug that should be fixed in the mainline kernel. [PATCH] Exists There is a patch that fixes this issue [TOOL] integrated-as The issue is relevant to LLVM integrated assembler labels Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants