illumos gcc 14.3.0 bringup#57
Conversation
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.
…ropagation eliding or changing arguments
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.
Originally from pkgsrc
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.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54720 libobjc install-strip target not populated
…cause nothing else will work
Not all illumos distributions have elfdump available as /usr/ccs/bin/elfdump
From Jonathan Perkin's patch in pkgsrc-extra
…e encoded characters. C++'s locale interface can only cope with a single char or a single wchar_t.
|
@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. |
rmustacc
left a comment
There was a problem hiding this comment.
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.
|
|
||
| int clen = mbtowc_l(&w, conv, tlen, __cloc); | ||
| if (clen <= 0) | ||
| return def; |
There was a problem hiding this comment.
Why is returning the default on conversion failure the correct choice? What if that's not something meaningful in the locale for this purpose?
There was a problem hiding this comment.
Do you have a better idea for what to do in this case? If the locale's multi-byte representation of this character cannot be converted to a wide character, the locale is broken and should be fixed.
The callers of this function are already filling in L',' as a default for mon_thousands_sep and thousands_sep in other contexts.
There was a problem hiding this comment.
I don't have a better idea, but there is nothing that guarantees L',' is actually valid in the locale in question. If we assume all locales are compatible with ASCII, then it's probably okay. I think that's mostly true with our non-UTF-8 locales, but it's definitely an assumption and hence why I asked about it.
There was a problem hiding this comment.
It's better than "mostly true" - L',' or 0x2c is the codepoint for a comma in all locales we define. And even if it weren't, a locale could avoid an incorrect fallback just by ensuring it defines appropriate values for all keywords.
The locales we have use a limited number of different character encodings -- UTF-8, various ISO8859 encodings, KOI-8, and GB18030.
All of these encodings use 0x2c as the codepoint for COMMA:
$ grep '\<COMMA\>' usr/src/data/locale/data/*.cm
GB18030.cm:<COMMA> \x2C
ISO8859-1.cm:<COMMA> \x2C
ISO8859-2.cm:<COMMA> \x2C
ISO8859-5.cm:<COMMA> \x2C
ISO8859-7.cm:<COMMA> \x2C
ISO8859-8.cm:<COMMA> \x2C
ISO8859-9.cm:<COMMA> \x2C
ISO8859-11.cm:<COMMA> \x2c
ISO8859-13.cm:<COMMA> \x2C
ISO8859-15.cm:<COMMA> \x2C
KOI8-R.cm:<COMMA> \x2C
UTF-8.cm:<COMMA> \x2C
(note: some spaces in the above output were removed for the sake of readability)
And as best I can tell, all of them match ASCII in the 0x20 - 0x3f range (most punctuation and digits).
So I think we're good.
|
@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. |
I've updated https://illumos.org/issues/7354 with testing notes; let me know where you want additional testing..
The locale patches have been sitting by themselves in pull request #56 for quite a while and could have been reviewed there. |
Apologies, I hadn't seen that. I will follow up with remaining review on that PR. |
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.