Skip to content

Commit

Permalink
lang/rust: drop bfd on powerpc
Browse files Browse the repository at this point in the history
  • Loading branch information
pkubaj committed Apr 27, 2024
1 parent 26983fe commit 0331296
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lang/rust/Makefile
Expand Up @@ -201,12 +201,10 @@ do-configure:
# Rust doesn't call the system compiler with the full version of the target.
# This makes powerpc miscompile due to the secure-plt ABI change.
# Additionally, force using ld.bfd to work around a linking problem in rustc_mir
@${PRINTF} '#!/bin/sh\nexec ${CC} "$$@" --target=powerpc-unknown-freebsd13.0' > ${WRKDIR}/cc-wrapper
@${PRINTF} '#!/bin/sh\nexec ${CC} "$$@" --target=powerpc-unknown-freebsd13.2' > ${WRKDIR}/cc-wrapper
@${CHMOD} +x ${WRKDIR}/cc-wrapper
@${PRINTF} '#!/bin/sh\nexec ${CXX} "$$@" --target=powerpc-unknown-freebsd13.0' > ${WRKDIR}/cxx-wrapper
@${PRINTF} '#!/bin/sh\nexec ${CXX} "$$@" --target=powerpc-unknown-freebsd13.2' > ${WRKDIR}/cxx-wrapper
@${CHMOD} +x ${WRKDIR}/cxx-wrapper
@${PRINTF} '#!/bin/sh\nexec ${CC} -fuse-ld=bfd "$$@" --target=powerpc-unknown-freebsd13.0' > ${WRKDIR}/ld-wrapper
@${CHMOD} +x ${WRKDIR}/ld-wrapper
.endif
.for _target in ${_RUST_TARGETS}
@${ECHO_CMD} '[target.${_target}]' >> ${WRKSRC}/config.toml
Expand All @@ -218,11 +216,7 @@ do-configure:
@${ECHO_CMD} 'cc="${CC}"' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'cxx="${CXX}"' >> ${WRKSRC}/config.toml
.endif
.if ${ARCH} == powerpc
@${ECHO_CMD} 'linker="${WRKDIR}/ld-wrapper"' >> ${WRKSRC}/config.toml
.else
@${ECHO_CMD} 'linker="${CC}"' >> ${WRKSRC}/config.toml
.endif
.if ${PORT_OPTIONS:MPORT_LLVM}
@${ECHO_CMD} 'llvm-config="${LOCALBASE}/bin/${LLVM_CONFIG}"' >> ${WRKSRC}/config.toml
.endif
Expand Down

0 comments on commit 0331296

Please sign in to comment.