This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] fix BZ 18116 - build failure on ppc64le: setcontext.S uses power6 mtfsf when not supported
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Steve Munroe <munroesj at linux dot vnet dot ibm dot com>, "Carlos O'Donell" <carlos at redhat dot com>
- Cc: Martin Sebor <msebor at redhat dot com>, Steve Munroe <sjmunroe at us dot ibm dot com>, Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 17 Mar 2015 11:47:04 -0400
- Subject: Re: [PATCH] fix BZ 18116 - build failure on ppc64le: setcontext.S uses power6 mtfsf when not supported
- Authentication-results: sourceware.org; auth=none
>> 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