[Bug 224217] [patch] Fix cross build of base/ ports

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Feb 5 23:32:21 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224217

--- Comment #18 from Mark Millard <marklmi26-fbsd at yahoo.com> ---
(In reply to Mark Millard from comment #17)

My results may have been skewed by my forgetting to
revert some forced -unknown- usage in BUTARGET
and BU_PREFIX in the likes of devel/binutils/Makefile
and devel/powerpc64-gcc/Makefile and in
CROSS_BINUTILS_PREFIX in
devel/powerpc64-xtoolchain-gcc/files/xtoolchain.mk.in .

I think this was from my earlier attempt at experimenting
with base/binutils and base/gcc .

For reference I had:

# svnlite diff /usr/ports/devel/binutils/Makefile
Index: /usr/ports/devel/binutils/Makefile
===================================================================
--- /usr/ports/devel/binutils/Makefile  (revision 460973)
+++ /usr/ports/devel/binutils/Makefile  (working copy)
@@ -36,7 +36,7 @@
 GNU_CONFIGURE= yes

 .if defined(PKGNAMEPREFIX)
-BUTARGET?=     ${PKGNAMEPREFIX}${OPSYS:tl}
+BUTARGET?=     ${PKGNAMEPREFIX}unknown-${OPSYS:tl}${OSREL}
 OPTIONS_EXCLUDE=       NLS
 INFO_PATH=     ${PKGNAMEPREFIX:S/-$//}/info
 CONFIGURE_ARGS+=       --disable-shared \

# svnlite diff /usr/ports/devel/powerpc64-gcc/Makefile
Index: /usr/ports/devel/powerpc64-gcc/Makefile
===================================================================
--- /usr/ports/devel/powerpc64-gcc/Makefile     (revision 460973)
+++ /usr/ports/devel/powerpc64-gcc/Makefile     (working copy)
@@ -29,7 +29,7 @@
 .if empty(GCC_TARGET)
 # We are building for a FreeBSD target
 GCC_TARGET?=   ${PKGNAMEPREFIX}unknown-${OPSYS:tl}${OSREL}
-BU_PREFIX?=    ${PKGNAMEPREFIX}${OPSYS:tl}
+BU_PREFIX?=    ${PKGNAMEPREFIX}unknown-${OPSYS:tl}${OSREL}
 EXTRA_PATCHES+= ${FILESDIR}/freebsd-format-extensions
 .else
 BU_PREFIX?=    ${GCC_TARGET}

# svnlite diff /usr/ports/devel/powerpc64-xtoolchain-gcc/Makefile
Index: /usr/ports/devel/powerpc64-xtoolchain-gcc/Makefile
===================================================================
--- /usr/ports/devel/powerpc64-xtoolchain-gcc/Makefile  (revision 460973)
+++ /usr/ports/devel/powerpc64-xtoolchain-gcc/Makefile  (working copy)
@@ -1,7 +1,7 @@
 # $FreeBSD$

 PORTNAME=      xtoolchain
-PORTVERSION=   0.2
+PORTVERSION=   0.3
 CATEGORIES=    devel
 MASTER_SITES=  # none
 DISTFILES=     # none
@@ -28,6 +28,7 @@
 SUB_FILES=     xtoolchain.mk
 SUB_LIST=      TARGETARCH=${TOOLCHAIN_PREFIX:C/-//g} \
                OPSYS=${OPSYS:tl} \
+               OSREL=${OSREL} \
                XCC=${XCC} \
                XCXX=${XCXX} \
                XCPP=${XCPP} \

# svnlite diff /usr/ports/devel/powerpc64-xtoolchain-gcc/files/xtoolchain.mk.in
Index: /usr/ports/devel/powerpc64-xtoolchain-gcc/files/xtoolchain.mk.in
===================================================================
--- /usr/ports/devel/powerpc64-xtoolchain-gcc/files/xtoolchain.mk.in   
(revision 460973)
+++ /usr/ports/devel/powerpc64-xtoolchain-gcc/files/xtoolchain.mk.in   
(working copy)
@@ -1,5 +1,5 @@
 XCC=%%LOCALBASE%%/bin/%%XCC%%
 XCXX=%%LOCALBASE%%/bin/%%XCXX%%
 XCPP=%%LOCALBASE%%/bin/%%XCPP%%
-CROSS_BINUTILS_PREFIX=%%LOCALBASE%%/%%TARGETARCH%%-%%OPSYS%%/bin/
+CROSS_BINUTILS_PREFIX=%%LOCALBASE%%/%%TARGETARCH%%-unknown-%%OPSYS%%%%OSREL%%/bin/
 X_COMPILER_TYPE=%%X_COMPILER_TYPE%%

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-pkg mailing list