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.
| } | ||
|
|
||
| /* | ||
| * Taken verbatim from config/locale/generic/ctype_members.cc. DragonFly |
There was a problem hiding this comment.
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?
| 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; |
There was a problem hiding this comment.
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).
| extern wchar_t lconv2wchar(char *conv, wchar_t def, locale_t __cloc); | ||
| extern char lconv2char(char *conv, char def); |
There was a problem hiding this comment.
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; |
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?
|
@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. |
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.