DescriptionUse -mtls-use-call in newlib build.
This cleans up the configure/make invocation for building newlib
to remove bit rot and pointless duplication, and to use a cleaner
method to set build options.
The CROSSARCH=nacl mode was (nonobviously) never really being used,
and so had unintended divergence from the CROSSARCH=nacl64 mode. I've
consolidated the newlib build commands to use consistent commands for
both modes without the unneeded mode test. The -m32/-m64 flags given
are superfluous here and overridden by a later -m32 or -m64 that the
newlib configury/makefiles will add anyway.
Passing values for CFLAGS et al as configure arguments is the
preferred method. It makes sure that they get saved properly in
config.status files and can't get lost by manual make runs or
automatic configure re-runs. The newlib configury does not support
that correctly for CCASFLAGS, so using CCASFLAGS settings at all was
error-prone. Instead, I put the assembly-specific -D option directly
into the CFLAGS_FOR_TARGET. There it's used for both C and assembly
compilations, but it does no harm for the C cases.
I used the make variable NEWLIB_CFLAGS to avoid manual repetition of
the flags given to both CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
The CXXFLAGS_FOR_TARGET is almost certainly pointless for newlib,
which contains no C++. But it does no harm to set it, and it should
be kept consistent with CFLAGS_FOR_TARGET without risk of bit rot due
to failure of manual parallel updates.
The shell commands to run configure and make were needlessly hairy
and made it quite unclear that they are doing something quite simple.
I made them just do the obvious thing instead.
I've verified empirically that the actual compiler options passed for
each file are no different after these cleanups except for the
addition of the option -D_I386MACH_ALLOW_HW_INTERRUPTS, and that the
.o files from the build did not change at all.
Finally, I did the actual point: adding -mtls-use-call to the options
for building newlib. This is needed for the newlib and libstdc++
builds to be used in the integrated runtime blob.
BUG=http://code.google.com/p/nativeclient/issues/detail?id=1595
TEST= local builds of toolchain and then {small,medium,large}_tests using it
R=mseaborn@google.com,khim@google.com,pasko@google.com,eaeltsin@google.com
Committed: http://src.chromium.org/viewvc/native_client?view=rev&revision=4820
Patch Set 1 #
Total comments: 1
Patch Set 2 : Adjusted makefile for suggested nits. Amended log entry with IRT-related rationale. #Messages
Total messages: 6 (0 generated)
|