This is the mail archive of the 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]

[Bug libc/10118] GLIBC fails to build on POWER6 after binutils change

------- Additional Comments From rsa at us dot ibm dot com  2009-05-07 00:38 -------
I found that the GLIBC target rules for .S files don't include $(CFLAGS) and the
submachine target from --with-cpu=CPU isn't propagated to $(ASFLAGS).

compile-command.S = $(compile.S) $(OUTPUT_OPTION) $(compile-mkdep-flags)

compile.S = $(CC) $< -c $(CPPFLAGS) $(S-CPPFLAGS) \
                  $(ASFLAGS) $(ASFLAGS-$(suffix $@))

The --with-cpu=CPU switch only propagates to $CFLAGS via configure's
`@libc_cv_cc_submachine@' to's $(cflags-cpu) to Makeconfig's
$(+cflags) to OVERRIDE CFLAGS.

When compiling a .S file with GCC the switch -mcpu=CPU should be used as well
such that the assembler can be invoked against the CPU insn set (implicit
equivalent to .machine "CPU").  The same thing can be accomplished by passing
-Wa,-mCPU but -mcpu=CPU is less error prone.  In the case of this bug, this fix
should result in _ARCH_PWR6 1 being emitted and the assembler in power6 insn
mode intrinsically.

I'll post a patch shortly.


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

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