mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-07 06:40:06 +00:00
3708c41ab9
- When cross-building packages, set ARCH to the target arch instead of the arch of the build host. This fixes bsd.ssp.mk on MIPS which was trying to enable SSP on MIPS cross-built packages because the host ARCH was amd64. A new HOST_ARCH variable is added to set the --build triple for configure scripts, but I believe most other uses of ARCH in ports are really about the target, not the build host so this is the more correct general direction. - Some updates to base/binutils and base/gcc to use ARCH as the target architecture. - Drop the extra arguments to GCC to set include and library paths and only set --sysroot. - Move the --sysroot flags into CC, CXX, CPP (which is now set to XCPP) and LD instead of passing it in CFLAGS, etc. The base/gcc build uses ends up using the CFLAGS when building native binaries for the build host which fails when tripping over the --sysroot. I think this might have accidentally worked before because the powerpc64 headers in /usr/include/machine were "close enough" to the amd64 headers, but with 32-bit MIPS this failed hard. - Add the GCC MIPS patch from devel/powerpc64-gcc to base/gcc to add MIPS support to base/gcc. - Add a MIPS plist for base/binutils. - Set helper variables for the base/gcc plist to tag architecture-specific headers (e.g. for intrinsincs) and use these to tag powerpc and MIPS specific headers. - Drop the include-fixed headers from base/gcc. - Strip /usr/local/include from the default list of include paths for base/gcc. - Use libc++'s include path for C++ for base/gcc. Reviewed by: bapt Approved by: portmgr (bapt) Differential Revision: https://reviews.freebsd.org/D15267
27 lines
523 B
Makefile
27 lines
523 B
Makefile
# $FreeBSD$
|
|
|
|
PORTEPOCH= 0
|
|
CATEGORIES= base
|
|
PKGNAMEPREFIX= ${OPSYS:tl}-
|
|
VALID_CATEGORIES= base
|
|
|
|
COMMENT= GNU binary tools for base
|
|
|
|
MASTERDIR= ${.CURDIR}/../../devel/binutils
|
|
PLIST= ${.CURDIR}/pkg-plist.${ARCH}
|
|
|
|
.if !defined(CROSS_TOOLCHAIN)
|
|
.error Please define CROSS_TOOLCHAIN before building
|
|
.endif
|
|
|
|
.if !defined(CROSS_SYSROOT)
|
|
.error Please define CROSS_SYSROOT before building
|
|
.endif
|
|
|
|
BUTARGET= ${ARCH}-unknown-${OPSYS:tl}${OSREL}
|
|
|
|
CONFIGURE_ARGS+= --disable-host-shared
|
|
PREFIX= /usr
|
|
|
|
.include "${MASTERDIR}/Makefile"
|