Page MenuHomeFreeBSD

Don't compile old gcc 4.2.1 archs by default in universe/tinderbox.
ClosedPublic

Authored by imp on Oct 8 2019, 4:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 2:13 PM
Unknown Object (File)
Fri, Apr 19, 7:40 AM
Unknown Object (File)
Mar 14 2024, 2:20 PM
Unknown Object (File)
Mar 14 2024, 2:20 PM
Unknown Object (File)
Mar 14 2024, 2:16 PM
Unknown Object (File)
Mar 14 2024, 2:16 PM
Unknown Object (File)
Mar 11 2024, 1:16 AM
Unknown Object (File)
Mar 5 2024, 6:49 AM
Subscribers

Details

Summary

Only compile clang supporting architectures of amd64, arm, arm64, and
i386 as part of universe. Compile the other architectures if
MAKE_OBSOLETE_GCC is defined. In all cases, explicit lists of
architectures in TARGETS= on the command line override.

Discussed on: arch@ (https://lists.freebsd.org/pipermail/freebsd-arch/2019-August/019674.html)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

brooks added inline comments.
Makefile
495 ↗(On Diff #63042)

riscv shouldn't be here. It does not and has never used gcc 4.2.1 and is later conditionalialized on the existence of the cross toolchain port.

On IRC, it was suggested I do the right thing for mips, etc if llvm90 and/or mips-gcc is installed. Will noodle around on that and post an update with riscv moved.

Makefile
495 ↗(On Diff #63042)

Correct. Will fix.

emaste requested changes to this revision.Oct 8 2019, 5:13 PM
This revision now requires changes to proceed.Oct 8 2019, 5:13 PM

xtoolchain part of the IRC ask

imp marked an inline comment as done.Oct 8 2019, 5:53 PM

I'll note it would be nice to have a more generic xtoolchain thing for things like llvm and/or "I'd like to do a universe with all the external toolchains regardless of base compiler support"

Makefile
520 ↗(On Diff #63046)

let's keep sorted

521 ↗(On Diff #63046)

I believe we have (and need) both mips and mips64 xtoolchain packages? But there's only powerpc64.

imp marked an inline comment as done.Oct 8 2019, 9:41 PM

Looking at Brooks' ask for llvm90, I think it's not quite ready for prime time, as we fail early in the build:

% make buildworld CROSS_TOOLCHAIN=llvm90 TARGET_ARCH=mips64
...
--- libstdc++.so.6.full ---
building shared library libstdc++.so.6
/usr/local/bin/clang90 -target mips64-unknown-freebsd13.0 --sysroot=/usr/home/imp/obj/usr/home/imp/git/head/mips.mips64/tmp -B/var/empty  -EB -mabi=64 -Wl,--version-script=libstdc++.map    -shared -Wl,-x -Wl,--fatal-warnings -Wl,--warn-shared-textrel  -o libstdc++.so.6.full -Wl,-soname,libstdc++.so.6  `NM='nm' NMFLAGS='' lorder bitmap_allocator.pico pool_allocator.pico mt_allocator.pico codecvt.pico compatibility.pico complex_io.pico ctype.pico debug.pico debug_list.pico functexcept.pico globals_io.pico ios.pico ios_failure.pico ios_init.pico ios_locale.pico limits.pico list.pico locale.pico locale_init.pico locale_facets.pico localename.pico stdexcept.pico strstream.pico tree.pico allocator-inst.pico concept-inst.pico fstream-inst.pico ext-inst.pico ios-inst.pico iostream-inst.pico istream-inst.pico istream.pico locale-inst.pico misc-inst.pico ostream-inst.pico sstream-inst.pico streambuf-inst.pico streambuf.pico string-inst.pico valarray-inst.pico wlocale-inst.pico wstring-inst.pico atomicity.pico codecvt_members.pico collate_members.pico ctype_members.pico messages_members.pico monetary_members.pico numeric_members.pico time_members.pico basic_file_stdio.pico c_locale.pico atomicity.pico codecvt_members.pico collate_members.pico ctype_members.pico messages_members.pico monetary_members.pico numeric_members.pico time_members.pico basic_file_stdio.pico c_locale.pico stubs.pico del_op.pico del_opnt.pico del_opv.pico del_opvnt.pico eh_alloc.pico eh_arm.pico eh_aux_runtime.pico eh_call.pico eh_catch.pico eh_exception.pico eh_globals.pico eh_personality.pico eh_term_handler.pico eh_terminate.pico eh_throw.pico eh_type.pico eh_unex_handler.pico guard.pico new_handler.pico new_op.pico new_opnt.pico new_opv.pico new_opvnt.pico pure.pico tinfo.pico tinfo2.pico vec.pico vterminate.pico cp-demangle.pico |  tsort -q` -Wl,-f,libsupc++.so.1  -lm
ld: error: can't create dynamic relocation R_MIPS_64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output

so I'm going to remain open to making that possible in the future, but won't gate this review on making that work (unless I find a way to make it go).

Makefile
520 ↗(On Diff #63046)

sure!

521 ↗(On Diff #63046)

I'll look into this, but it does rather complicate things :(

imp marked an inline comment as done.Oct 8 2019, 10:56 PM
imp added inline comments.
Makefile
521 ↗(On Diff #63046)

According to jhb, we just need mips, so I'll just use that

emaste added inline comments.
Makefile
10 ↗(On Diff #63046)

maybe to also build or to include or such, to me the current wording implies MAKE_OBSOLETE_GCC builds just the non-Clang archs.

521 ↗(On Diff #63046)

OK. When I originally did the TOOLCHAINS_riscv part I was anticipating some archs might need two toolchains (hence the plural), but did not sort out the MAKE_PARAMS bit.

In any case I think it's fine to go ahead with this and we can adjust/revert as necessary.

We'll want to make sure the universe* machines have the four riscv64-gcc, mips-gcc, powerpc-gcc, sparc64-gcc packages installed.

This revision is now accepted and ready to land.Oct 9 2019, 12:52 PM
jhb added inline comments.
head/Makefile
495

This kind of seems like a no-op part of the change? That is, _DEFAULT_TARGETS is still always the same?
Just listing "mips powerpc sparc64" directly in OBSOLETE_GCC_TARGETS would have been a smaller diff as you wouldn't have needed this hunk at all I think, and hardcoding that list kind of makes sense since you have to hardcode the MAKE_PARAMS_<foo> variables just below it anyway

Makefile
10 ↗(On Diff #63046)

Sure. This sounds like a good suggestion.

head/Makefile
495

That's fair. I debated making that change last night, but it had slipped my mind when I pushed it just now.