Page MenuHomeFreeBSD

Make sure <arch-gcc> come with consistent content
ClosedPublic

Authored by kan on Apr 28 2017, 5:43 PM.

Details

Summary

Expand hackery in post-install target to
make sure that we always end up with same set of
$GCC_TARGET-prefixed files no matter if port is
built for cross target or for native target to be
used as external toolchain.

Test Plan

poudriere testport

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kan created this revision.Apr 28 2017, 5:43 PM
kan updated this revision to Diff 27833.Apr 28 2017, 5:56 PM

Remove two ls command used for debugging, silence shell.

kan added inline comments.Apr 28 2017, 5:56 PM
devel/powerpc64-gcc/Makefile
70 ↗(On Diff #27830)

Err, I'll remove these two

kan marked an inline comment as done.Apr 28 2017, 5:57 PM

I built examples based on patching:

$ svnlite info /usr/ports/ | grep "Re[plv]"
Relative URL: ^/head
Repository Root: svn://svn.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 439263
Last Changed Rev: 439263

with all the builds being from head -r317015 . . .

amd64: built amd64-gcc powerpc64-gcc aarch64-gcc
powerpc64: built powerpc64-gcc
aarch64: built aarch64-gcc

So a mix of self-hosted/native builds and cross builds.

In all cases the builds completed and:

find /usr/local/ -name "*-unknown-freebsd12.0*" -print | sort

looked good for the devel/*-gcc (s) involved.

This revision is now accepted and ready to land.Apr 28 2017, 7:31 PM

FYI: prior to this change a self-hosted/native build of
devel/aarch64-gcc or devel/powerpc64-gcc would
fail for not finding 6 files listed in pkg-plist .
devel/arm64-gcc did not list the 6 files there and so
did not install them but the self-hosted/native build
would complete.

I should note that when devel/*-binutils went to
2.28 which failed I reverted to devel/*binutils
-r436731 (2.27) in order for things to work. I still
have that configuration and it was used in the
test builds that I did.

Modern devel/*-binutils might explain some
of -r439595 and the change in this review
might address the packaging issues noted
in -r439959 since it does list the host
doing self-hosted builds for things like
aarch64.

linimon edited edge metadata.May 17 2017, 12:53 PM

I am currently testing these patches on various tier-2 archs.

emaste accepted this revision as: emaste.May 17 2017, 6:00 PM

Looks ok to me, but I'm not a ports committer and can't officially approve.

imp accepted this revision.May 17 2017, 6:03 PM

Looks good to my eye as well...

Here are the results from armv6:

[05:51:00] ====>> Built ports: devel/arm-none-eabi-binutils devel/sparc64-binutils devel/aarch64-binutils devel/powerpc64-binutils devel/aarch64-none-elf-binutils devel/mips64-binutils devel/mips-binutils devel/riscv64-binutils devel/aarch64-gcc devel/aarch64-xtoolchain-gcc devel/arm-none-eabi-gcc492 devel/aarch64-none-elf-gcc devel/sparc64-gcc devel/sparc64-xtoolchain-gcc devel/riscv64-gcc devel/riscv64-xtoolchain-gcc devel/mips64-gcc devel/mips-gcc devel/mips64-xtoolchain-gcc devel/mips-xtoolchain-gcc devel/arm-none-eabi-gcc devel/powerpc64-gcc devel/powerpc64-xtoolchain-gcc
[05:51:00] ====>> Failed ports: devel/amd64-gcc:build
[05:51:00] ====>> Skipped ports: devel/amd64-xtoolchain-gcc

The devel/amd64-gcc failure is:

In file included from /wrkdirs/usr/ports/devel/amd64-gcc/work/gcc-6.3.0/gcc/config/i386/driver-i386.c:28:
/wrkdirs/usr/ports/devel/amd64-gcc/work/gcc-6.3.0/gcc/config/i386/cpuid.h:223:3: error: invalid output constraint '=a' in asm

__cpuid (__ext, __eax, __ebx, __ecx, __edx);
^

This is still a lot better than what we have so far.

I am continuing tests on other archs.

The builds on amd64 all pass.

bapt accepted this revision.May 26 2017, 12:56 PM
This revision was automatically updated to reflect the committed changes.