Skip to content

Assembly options not recognized when using integrated assembler #19063

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

Closed
rengolin opened this issue Feb 1, 2014 · 9 comments
Closed

Assembly options not recognized when using integrated assembler #19063

rengolin opened this issue Feb 1, 2014 · 9 comments
Assignees
Labels
backend:ARM bugzilla Issues migrated from bugzilla wontfix Issue is real, but we can't or won't fix it. Not invalid

Comments

@rengolin
Copy link
Member

rengolin commented Feb 1, 2014

Bugzilla Link 18689
Resolution WONTFIX
Resolved on Feb 21, 2014 05:20
Version trunk
OS Linux
Blocks #19300
CC @walkerkd,@tinti

Extended Description

While compiling the Linux kernel with the IAS, we get this two parameter errors:

/llvmlinux/toolchain/clang/install/bin/clang -gcc-toolchain
/llvmlinux/arch/arm/toolchain/codesourcery/arm-2013.05
-Wp,-MD,arch/arm/vfp/.vfphw.o.d -nostdinc -isystem
/llvmlinux/toolchain/clang/install/bin/../lib/clang/3.5/include
-I/llvmlinux/targets/vexpress/src/linux/arch/arm/include
-Iarch/arm/include/generated -Iinclude
-I/llvmlinux/targets/vexpress/src/linux/arch/arm/include/uapi
-Iarch/arm/include/generated/uapi
-I/llvmlinux/targets/vexpress/src/linux/include/uapi -Iinclude/generated/uapi
-include /llvmlinux/targets/vexpress/src/linux/include/linux/kconfig.h
-D__KERNEL__ -target arm-none-linux-gnueabi -Qunused-arguments
-Wno-unknown-warning-option -D__ASSEMBLY__ -integrated-as -mfpu=vfp
-funwind-tables -marm -D__LINUX_ARM_ARCH__=7 -march=armv7-a
-include asm/unified.h -Wa,-mfpu=softvfp+vfp -mfloat-abi=soft -Wa,--gdwarf-2
-c -o arch/arm/vfp/vfphw.o arch/arm/vfp/vfphw.S

clang-3.5: error: unsupported argument '-mfpu=softvfp+vfp' to option 'Wa,'
clang-3.5: error: unsupported argument '--gdwarf-2' to option 'Wa,'

The easiest solution would be to add them as alias... But the dwarf2 worries me, since, AFAIK, we can't guarantee it.

@rengolin
Copy link
Member Author

rengolin commented Feb 1, 2014

assigned to @rengolin

@rengolin
Copy link
Member Author

rengolin commented Feb 4, 2014

Explanations about the vfp choices:

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472c/BABDGGBI.html

About Dwarf2, I'd rather change that in the Make files, as we don't support Dwarf2 any more and accepting that flag would be an error.

@walkerkd
Copy link
Collaborator

walkerkd commented Feb 5, 2014

Also the clang option is currently -gdwarf-2 and not --gdwarf-2, hence the unsupported argument error.

It appears that GNU as accepts both versions of the option; but interestingly it accepts -gdwarf-3 but not --gdwarf-3.

But I agree that as we don't support DWARF-2 the Makefile should be changed to at least -gdwarf-3

@rengolin
Copy link
Member Author

rengolin commented Feb 5, 2014

Also the clang option is currently -gdwarf-2 and not --gdwarf-2, hence the unsupported argument error.

Right, so this is a bug, since the standard now is to use two dashes, not one.

Dwarf 2 support should remain untouched and if debugging the kernel breaks, they've been warned! ;)

@rengolin
Copy link
Member Author

rengolin commented Feb 5, 2014

I think Keith is right, we should use -dwarf-2 on both compilers, especially with GCC only accepting -dwarf-3.

Vinicius/Behan, do you think such a patch would be easy to maintain? I think, given that it will work with GCC, upstreaming it would be a no-brainer.

cheers,
--renato

@rengolin
Copy link
Member Author

Proposal for softvfp implementation:

http://llvm-reviews.chandlerc.com/D2817

@rengolin
Copy link
Member Author

The dwarf-2 issue, I hear, has already been changed in the LLVMLinux and Linaro's kernel trees, so we can consider it "fixed".

@rengolin
Copy link
Member Author

I have had long discussions about softvfp+vfp and the conclusion is this:

  • In GNU tools -mfpu=fp means: use FP AND change to hard-float ABI.
  • The original meaning of softvfp+vfp was that it should use FP
    instructions (but VFP instead of the, then default, FPA) but not
    change the float ABI.

Since we don't support FPA instructions in LLVM, and GCC will not emit
them by default, and we now have -mfloat-abi=softfp, the flag is no
longer relevant and we can simply remove it.

The only reason it might still be in, as Ramana pointed out, is to
work around very old binutils bugs regarding build attributes and
linking soft+hard objects together. In the case where removing the
flag introduces undesirable behaviour, we should fix that behaviour
instead, not continue using an ad-hoc outdated and deprecated flag.

@rengolin
Copy link
Member Author

mentioned in issue #19300

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
@Quuxplusone Quuxplusone added the wontfix Issue is real, but we can't or won't fix it. Not invalid label Jan 20, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:ARM bugzilla Issues migrated from bugzilla wontfix Issue is real, but we can't or won't fix it. Not invalid
Projects
None yet
Development

No branches or pull requests

3 participants