This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] fix BZ 18116 - build failure on ppc64le: setcontext.S uses power6 mtfsf when not supported


>> I believe that problem is different then stated. With GCC-5.0 the gcc
>> driver for the powerpc64le target defaults to power8. This sets the
>> _ARCH_PWR8, _ARCH_PWR7, _ARCH_PWR6, etc. macros. But without an explicit
>> -mcpu=power6|7|8, gcc will not pass a -mpower6|7|8 option to the
>> assembler.
>
> So the macro is set, but the assembler support is now orthogonal
> to the macro.

GCC includes the driver program (gcc), the isolated C pre-processor
(cpp) and the compiler (cc1).  When assembling setcontext.S, Glibc is
utilizing the driver and the pre-processor components of GCC.

For complicated sets of multiple gcc driver architecture options, it
is impractical for the driver to automagically determine the correct
command line option to invoke the assembler.  The compiler and
pre-processor know the target architecture (ISA).  The pre-processor
defines the macros and the compiler emits an explicit ".machine XXX"
pseudo-op in the assembly language prologue at the beginning of the
assembly file to communicate the required architecture to the
assembler.

The driver does not know the final target architecture.  Hand-written
assembly language files with non-default ISA requirements now must
specify the target architecture equivalent to compiler-generated
assembly language files.

Thanks, David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]