Page MenuHomeFreeBSD

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

Authored by imp on Tue, Oct 8, 4:47 PM.



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@ (

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

imp created this revision.Tue, Oct 8, 4:47 PM
brooks added a subscriber: brooks.Tue, Oct 8, 4:49 PM
brooks added inline comments.
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.

imp added a comment.Tue, Oct 8, 5:05 PM

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.

495 ↗(On Diff #63042)

Correct. Will fix.

emaste requested changes to this revision.Tue, Oct 8, 5:13 PM
This revision now requires changes to proceed.Tue, Oct 8, 5:13 PM
imp updated this revision to Diff 63046.Tue, Oct 8, 5:51 PM

xtoolchain part of the IRC ask

imp marked an inline comment as done.Tue, Oct 8, 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"

emaste added inline comments.Tue, Oct 8, 5:56 PM
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.

brooks accepted this revision.Tue, Oct 8, 8:53 PM


imp marked an inline comment as done.Tue, Oct 8, 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
--- ---
building shared library
/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,    -shared -Wl,-x -Wl,--fatal-warnings -Wl,--warn-shared-textrel  -o -Wl,-soname,  `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,  -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).

520 ↗(On Diff #63046)


521 ↗(On Diff #63046)

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

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

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

emaste accepted this revision.Wed, Oct 9, 12:52 PM
emaste added inline comments.
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.Wed, Oct 9, 12:52 PM
This revision was automatically updated to reflect the committed changes.
jhb added a subscriber: jhb.Wed, Oct 9, 9:04 PM
jhb added inline comments.

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

imp added inline comments.Wed, Oct 9, 9:08 PM
10 ↗(On Diff #63046)

Sure. This sounds like a good suggestion.


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