Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

"section type does not match previous section type" with -no-integrated as #24252

Open Quuxplusone opened 9 years ago

Quuxplusone commented 9 years ago
Bugzilla Link PR24253
Status NEW
Importance P normal
Reported by Jeffrey Walton (noloader@gmail.com)
Reported on 2015-07-24 15:04:52 -0700
Last modified on 2015-08-03 16:10:32 -0700
Version 3.6
Hardware PC MacOS X
CC grosbach@apple.com, llvm-bugs@lists.llvm.org, rafael@espindo.la
Fixed by commit(s)
Attachments algparam.s (733919 bytes, application/octet-stream)
algparam.ii (583106 bytes, application/octet-stream)
Blocks
Blocked by
See also
Created attachment 14642
algparam.s file (temporary artifact)

We are performing some testing on OS X 10.8.5, fully patched. Disabling the
integrated assembler results in the following when compiling a particular
source file:

    section type does not match previous section type

Here's the invocation:

    $ export CXX="clang++ -no-integrated-as"
    $ export CXXFLAGS="-g2 -O3 -DNDEBUG -DCRYPTOPP_DISABLE_ASM --save-temps"
    $ make clean && make
    ...
    clang++ -no-integrated-as -g2 -O3 -DNDEBUG -DCRYPTOPP_DISABLE_ASM --save-temps -fPIC -march=native -DCRYPTOPP_DISABLE_ASM -Wall -Wno-tautological-compare -pipe -c algparam.cpp
    algparam.s:2718:section type does not match previous section type

algparam.cpp can be found at
https://github.com/weidai11/cryptopp/blob/master/algparam.cpp.
Quuxplusone commented 9 years ago

Attached algparam.s (733919 bytes, application/octet-stream): algparam.s file (temporary artifact)

Quuxplusone commented 9 years ago

Attached algparam.ii (583106 bytes, application/octet-stream): algparam.ii file (temporary artifact)

Quuxplusone commented 9 years ago
I don't think -no-integrated-as is supported at all on OS X. I get way more
errors:

algparam.s:2:Unknown pseudo-op: .macosx_version_min
algparam.s:2:Rest of line ignored. 1st junk character valued 49 (1).
algparam.s:39:Unknown pseudo-op: .cfi_startproc
algparam.s:43:Unknown pseudo-op: .cfi_def_cfa_offset
algparam.s:43:Rest of line ignored. 1st junk character valued 49 (1).
...

Jim, should we just start producing an error in the clang driver if -no-
integrated-as is used on OS X?
Quuxplusone commented 9 years ago

In newer clang on Darwin -no-integrated-as means "generate a .s file first, then assemble it" rather than "use the old assembler."

There are some crazy projects (mainly open source stuff on macports/homebrew style stuff, I think) that use that w/ a shim script to do processing on the .s file in-flight. They're terrible, terrible things I use to frighten young engineers on dark and stormy nights.

Quuxplusone commented 9 years ago
(In reply to comment #3)
> In newer clang on Darwin -no-integrated-as means "generate a .s file first,
> then assemble it" rather than "use the old assembler."

With current trunk I still see clang running

/usr/bin/as" -Q -arch x86_64 -force_cpusubtype_ALL -o algparam.o algparam.s
Quuxplusone commented 9 years ago

It's /usr/bin/as that's changing.