[MacPorts] #59694: libgcc7 fails to compile (ld: illegal text-relocation to ___cpu_indicator_init)
MacPorts
noreply at macports.org
Sun Dec 1 19:36:07 UTC 2019
#59694: libgcc7 fails to compile (ld: illegal text-relocation to
___cpu_indicator_init)
-----------------------+--------------------
Reporter: rmottola | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: |
-----------------------+--------------------
Comment (by kencu):
Here's what I did, Riccardo. Not sure if every bit of this is needed. I
just did it all and gcc7/libgcc7 built. Now to see if just doing some
subset of this is sufficient to fix it.
{{{
$ git diff --no-index
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/lang/gcc7
./
diff --git
a/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/lang/gcc7/Portfile
b/./Portfile
index 27bf288..268b8de 100644
---
a/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/lang/gcc7/Portfile
+++ b/./Portfile
@@ -94,10 +94,6 @@ configure.args --enable-
languages=c,c++,objc,obj-c++,lto,fortran \
--disable-multilib \
--enable-lto \
--enable-libstdcxx-time \
- --with-build-config=bootstrap-debug \
- --with-as=${prefix}/bin/as \
- --with-ld=${prefix}/bin/ld \
- --with-ar=${prefix}/bin/ar \
--with-bugurl=https://trac.macports.org/newticket
# see https://lists.macports.org/pipermail/macports-
dev/2017-August/036209.html
@@ -105,18 +101,6 @@ configure.args --enable-
languages=c,c++,objc,obj-c++,lto,fortran \
# it only determines how std::call_once works
configure.args-append \
--disable-tls
-
-configure.env-append \
- AR_FOR_TARGET=${prefix}/bin/ar \
- AS_FOR_TARGET=${prefix}/bin/as \
- LD_FOR_TARGET=${prefix}/bin/ld \
- NM_FOR_TARGET=${prefix}/bin/nm \
- OBJDUMP_FOR_TARGET=${prefix}/bin/objdump \
- RANLIB_FOR_TARGET=${prefix}/bin/ranlib \
- STRIP_FOR_TARGET=${prefix}/bin/strip \
- OTOOL=${prefix}/bin/otool \
- OTOOL64=${prefix}/bin/otool
-
pre-configure {
configure.args-append --with-pkgversion="MacPorts ${name}
${version}_${revision}${portvariants}"
@@ -359,12 +343,21 @@ configure.env-append \
build.env-append \
"CPP=${configure.cc} -E" \
"CXXCPP=${configure.cxx} -E"
-
-# gcc default optflags are required to build gcc7 with older compilers
-# see https://trac.macports.org/ticket/59706
-# we probably also want to clear out the rest of the configure.XYZ flags
+
configure.optflags
+if {${os.major} < 10} {
+ pre-configure {
+ xinstall -d ${workpath}/tools
+ set tools {nm as ar otool ranlib lipo libtool segedit strip size
strings ld ld64}
+ foreach tool $tools {
+ ln -s /usr/bin/$tool ${workpath}/tools/$tool
+ }
+ }
+ configure.env-append PATH=${workpath}/tools:${env(PATH)}
+ build.env-append PATH=${workpath}/tools:${env(PATH)}
+}
+
configure.cc-append [get_canonical_archflags]
configure.cc_archflags
configure.cxx-append ${configure.cxx_archflags}
}}}
--
Ticket URL: <https://trac.macports.org/ticket/59694#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list