Skip to content

illumos gcc 14.3.0 bringup#57

Open
citrus-it wants to merge 38 commits into
illumos:il-14_3_0from
omniosorg:il-14_3_0
Open

illumos gcc 14.3.0 bringup#57
citrus-it wants to merge 38 commits into
illumos:il-14_3_0from
omniosorg:il-14_3_0

Conversation

@citrus-it
Copy link
Copy Markdown
Member

@citrus-it citrus-it commented Apr 19, 2026

This is the set of patches that are being used in OpenIndiana, OmniOS and Helios which have shipped gcc 14.3 for some time now.

Other than changes necessary to move the patches forward and rebase them, the main change from 14.2.0 is the introduction of locale patches from @Bill-Sommerfeld - the last three; see #56

The testsuite results are in the same area as those from 14.2, the majority pass and most of the test failures are due to our reluctance to omit the frame pointer.

                === gcc Summary for unix//-m32 ===
# of expected passes            191081
# of unexpected failures        299
# of unexpected successes       26
# of expected failures          1577
# of unresolved testcases       98
# of unsupported tests          5041
                === gcc Summary for unix//-m64 ===
# of expected passes            188687
# of unexpected failures        127
# of expected failures          1563
# of unsupported tests          3456
                === gcc Summary for unix//-m64/-msave-args ===
# of expected passes            193525
# of unexpected failures        384
# of expected failures          1645
# of unsupported tests          3441
                === gcc Summary ===
# of expected passes            573293
# of unexpected failures        810
# of unexpected successes       26
# of expected failures          4785
# of unresolved testcases       98
# of unsupported tests          11938

richlowe and others added 30 commits April 19, 2026 22:08
Stock GCC is overly willing to violate the ABI when calling local functions,
such that it passes arguments in registers on i386.  This hampers debugging
with anything other than a fully-aware DWARF debugger, and is generally not
something we desire.

Implement a flag which disables this behaviour, enabled by default.  The flag is
global, though only effective on i386, to more easily allow its globalization
later which, given the odds, is likely to be necessary.
Optimizations which clone functions to create call-specific implementations
which may be better optimized also dissociate these functions from their
symbol names in ways harmful to tracing and debugging (since there are now
several implementations of a single source symbol, quite possibly none of them
having the actual source symbol name).

This allows any function cloning to be disabled, and makes any such
optimization ineffective, and our source safe for debuggers everywhere.
Originally implemented in:
    commit 023cc9a
    Author: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
    Date:   Wed Jun 29 23:51:34 2005 +0000

        	* gcc/dwarf2.h (DW_AT_SUN_amd64_parmdump): New.
        	* gcc/dwarf2out.c (gen_subprogram_die): Add this attribute.
        	* gcc/doc/invoke.texi (-msave-args): New x86-64 option.
        	* gcc/config/i386/i386.h (MASK_SAVE_ARGS, TARGET_SAVE_ARGS): New.
        	(TARGET_SWITCHES): Add -msave-args.
        	* gcc/config/i386/i386.c (struct ix86_frame): Add nmsave_args and
        	padding0.
        	(pro_epilogue_adjust_stack): Declare.
        	(ix86_nsaved_args): New.
        	(override_options, ix86_can_use_return_insn_p,
        	ix86_frame_pointer_required, ix86_compute_frame_layout,
        	ix86_emit_save_regs, ix86_emit_save_regs_using_mov,
        	ix86_expand_prologue, ix86_expand_epilogue): Handle -msave-args.

        git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/csl-sol210-3_4-branch@101443 138bc75d-0d04-0410-961f-82ee72b054a4
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
level or options to gcc - we like stack traces too much and it is of
questionable benefit anyway, even on i386.
The RTL is included directly in the test, and was generated without
saved parameters.

Attempting the test with -msave-args means the prologue and epilogue
adjustments think there are saved parameters where there are not.
I did this, I think, to double check some assumptions.  Unfortunately,
there is a case where the fp won't be valid here, despite us having
saved arguments.  That where we're returning through an error handler
via __builtin_eh_return().

While here, make the code more readable and conventional.
This will always fail if saving arguments, because we're testing
argument registers are untouched, so saving them will ruin that.
We used to say it made no sense in 32bit mode, but it doesn't make sense
in 16bit mode either
…-*.o contain debug info that should be stripped
Fix following error message:

$ /usr/gcc/9/bin/go build main.go
ar: bad option: -D
usage:
    ar -d [-SvV] archive [file...]
    ar -m [-SvV] [-{a|b|i} posname] archive [file...]
    ar -p [-sSvV] archive [file ...]
    ar -q [-cSvV] archive [file...]
    ar -r [-cSuvV] [-{a|b|i} posname] archive [file...]
    ar -t [-sSvV] archive [file...]
    ar -x [-CsSTvV] archive [file...]
    ar [-sSvV] archive

The error is harmless, no functionality issue, GCCGO runs Solaris "ar" which
doesn't know -D option, after failure, GCCGO runs it again without -D.
Not all illumos distributions have elfdump available as /usr/ccs/bin/elfdump
@citrus-it citrus-it changed the title gcc 14.3.0 bringup illumos gcc 14.3.0 bringup Apr 19, 2026
@rmustacc
Copy link
Copy Markdown

@citrus-it do you have any notes on what's different here as compared to 14.2.0 and anything related to test results/

@citrus-it
Copy link
Copy Markdown
Member Author

@citrus-it do you have any notes on what's different here as compared to 14.2.0 and anything related to test results/

I've added notes to the PR description.

Copy link
Copy Markdown

@rmustacc rmustacc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is the first time that the locale patches are landing here. Can we get additional testing notes on these? It seems some of these patches were derived from work Jonathan Perkin did? It would have been nice to be able to review the locale changes separately from all the bring up work.

}

/*
* Taken verbatim from config/locale/generic/ctype_members.cc. DragonFly
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please add more context here? I'm trying to follow these and to be honest, the changes here don't really make a lot of sense, but I'm sure that's just because there's a layer of indirection that's going on. Is the idea that we're trying to encode some of how the ctype logic works with the mask bits? Who's mask bits are these supposed to refer to? Abstract ones in gcc, our actual ones?

Comment on lines +61 to +67
char lconv2char(char *conv, char def)
{
wchar_t w = def;
const size_t tlen = strlen(conv);
if (tlen == 1)
w = (wchar_t) conv[0];
return w;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function implementation doesn't really make sense, sorry. Why are we creating a wchar_t, casting into it, and then returning a char itself, which is just going to truncate the resulting wchar_t. There isn't even a guarantee that the representation of a length 1 item is equivalent in a wchar_t (yes it's true for UTF-8 based locales where the representation is UTF-32).

Comment on lines +40 to +41
extern wchar_t lconv2wchar(char *conv, wchar_t def, locale_t __cloc);
extern char lconv2char(char *conv, char def);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make conv in these const so it's clear that this data is not supposed to be manipulated?


int clen = mbtowc_l(&w, conv, tlen, __cloc);
if (clen <= 0)
return def;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is returning the default on conversion failure the correct choice? What if that's not something meaningful in the locale for this purpose?

@rmustacc
Copy link
Copy Markdown

@citrus-it I would be happy to land everything minus the locale patches and wait to tag there. Since they are their own new feature, I would prefer not to tie that into the initial compiler integration until we have accepted them here. Conversely, I'd be happy to also not tag and push out stuff for folks until we get that in so we can always say 14.3 has it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

6 participants