Commit Graph

7 Commits

Author SHA1 Message Date
Bryan Drewery
17e3ebb1ad Fix libcompat not handling some external toolchain flags.
- Use libc++ with GCC.
- Use CROSS_BINUTILS_PREFIX with -B (r280980 addressed this mostly already)

Sponsored by:	EMC / Isilon Storage Division
2016-03-25 19:12:44 +00:00
Bryan Drewery
1b337a349d Build libcompat (lib32) with a --sysroot pointing into its stage directory.
This overrides the cross-compiler's default sysroot to use the WORLD32's
sysroot for building the lib32 libraries.  Previously the cross-compiler
would default the sysroot to the 64bit WORLDTMP and -B/-L/-isystem flags
were used to build using the lib32 files.  This leads to multiple issues
discussed later.  Some extra headers are now needed to be staged since the
64bit WORLDTMP is not referenced at all for headers.  The 64bit WORLDTMP
is still used via PATH for build tools.  Overriding the default
target/arch is retained in the CC/CXX overrides.

This allows reverting the LDSCRIPT rewriting in installworld from r296921 and
r235122, thus allowing read-only objdirs to work for installing again.

This removes the need for _LDSCRIPTROOT.

This allows progressing the change to always use --sysroot for the build
rather than only relying on the cross-compiler's default sysroot.  The
work for that is in D3970 and needed to resolve WITHOUT_CROSS_COMPILER
not using a --sysroot [1].

PR:		196193 [1]
Sponsored by:	EMC / Isilon Storage Division
2016-03-25 19:12:38 +00:00
Bryan Drewery
429882e6aa LIBRARIES_ONLY should only be defined during install32.
r245561 added it to prevent extra files from being installed during
the install32 phase (to prevent duplicates in the meta log with -DNO_ROOT).
The flag should not be passed during build32 though since it may
prevent staging of includes during the 'make includes' phase on
library directories.

Sponsored by:	EMC / Isilon Storage Division
2016-03-25 19:12:13 +00:00
Bryan Drewery
37a8c977c4 Explicit 'make obj' for library dirs in build32 is not needed.
In r138291 some directories were explicitly made to run 'make obj',
but each target in 'make libraries' already runs 'make obj' for
each library since r161580.

Sponsored by:	EMC / Isilon Storage Division
2016-03-24 21:48:01 +00:00
Warner Losh
bb52d711d0 Use the newly minted Makefile.libcompat to implement libsoft libraries
for the armv6 ABI switch. This also make WITH_LIBSOFT functional on
the arm platform. As a transition thing, this seems to work even
without switching the ABI (we basically build the same libraries
twice when MK_LIBSOFT=yes until the ABI cut over next
month). MK_LIBSOFT remains default no.
2016-03-12 23:25:05 +00:00
Bryan Drewery
048ce0938e Follow-up r296709: Fix build32 not properly building all libraries.
Pointyhat to:	bdrewery
Reported by:	antoine
2016-03-12 18:41:27 +00:00
Bryan Drewery
dba75e9fa5 Move Makefile.lib32 to Makefile.libcompat and generalize it.
This is in preparation for LIBSOFT.

This file only supports *1* LIBCOMPAT value currently and must be capitalized.
In Makefile.libcompat given LIBCOMPAT=FOO there can be values set for
LIBFOOCFLAGS, LIBFOOCPUFLAGS, LIBFOOWMAKEENV, LIBFOOWMAKEFLAGS, LIBFOOCPUFLAGS,
and LIBFOODTRACE.  These will have the standard cross-build values appended
onto them.

This could be extended to support multiple libcompat libraries in the future
once there is a need.

Reviewed by:	imp
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D5612
2016-03-11 23:56:33 +00:00