Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
008dd1a
README.md: Add a simple description of what's what
richlowe Apr 17, 2011
5e12007
gcc: enable the .eh_frame based unwinder
richlowe Mar 5, 2014
2a4c2aa
intl: Don't use UTF-8 quotes. Ever.
richlowe Mar 11, 2014
35c0efb
Implement -fstrict-calling-conventions
richlowe Oct 27, 2012
95ff20d
allow the global disabling of function cloning
richlowe Sep 30, 2012
a819ca6
strict-cc2: check that disabling function cloning prevents constant p…
richlowe Mar 4, 2014
2415db8
sol2: enable full __cxa_atexit support
richlowe Mar 4, 2014
ac52312
i386: Save integer-passed arguments to the stack, to aid debuggers.
richlowe Jan 24, 2016
a90bdcf
16 update cmn_err format specifier
Nov 5, 2016
e70ee2f
19 cmn_err %b conversion should accept 0 flag
Feb 13, 2017
0affb1e
We never want to omit the frame pointer, regardless of the optimisation
citrus-it Oct 25, 2018
bd28674
libgo: libelf on illumos doesn't support largefile
richlowe Oct 29, 2018
f1f65fa
tests: x86_64 pro_and_epilogue RTL can't work with -msave-args
richlowe May 2, 2019
d96d5fc
i386: don't assert the FP is valid during epilogue adjustment
richlowe May 3, 2019
bceb7b4
gcc.target/i386/retarg: skip if msave-args
richlowe May 3, 2019
a75d099
i386: use correct error message about -msave-args and ABIs
richlowe May 3, 2019
502ba4a
gcc.target/i386: skip 16bit tests when -msave-args
richlowe May 3, 2019
75a14bc
Use compare-debug to pass stage2/stage3 comparison as avx_*.o and sse…
alarcher Oct 25, 2018
d7ffb6f
Address fixincludes failure
alarcher Oct 25, 2018
89fe576
Use GNU backends for gcc-{ar,nm,ranlib}
citrus-it Jul 19, 2019
09f4561
Fix libsanitizer build for illumos
alarcher Nov 12, 2019
739ed56
gccgo should use GNU ar
psumbera Nov 13, 2019
6f3b628
Make install-strip target work for libobjc
Nov 15, 2019
592e2aa
i386: use the new-style retpoline thunk names for external thunks, be…
richlowe Feb 7, 2018
91cb475
Use appropriate values objects
citrus-it Jan 7, 2020
d423aa2
-G should imply the same specs as -shared
citrus-it Feb 19, 2020
ed392ee
Correct path to elfdump
citrus-it Apr 10, 2020
cc858bb
Convert unsupported use of -msave-args to a warning
citrus-it Apr 11, 2020
1c91a50
Use the illumos libc SSP implementation for -fstack-protector
citrus-it Nov 4, 2020
8f17a1a
13185 -zassert-deflib does not work for 64-bit objects
citrus-it Jan 11, 2021
e6220df
13726 distinguish ourselves with a macro (__illumos__)
citrus-it Apr 28, 2021
c00abc9
libstdc++ must use thread-local errno
citrus-it Aug 31, 2021
9ad2b21
Add -fforce-omit-frame-pointer
citrus-it Oct 26, 2022
bb60758
cmn_err() supports 'h' and 'hh' (6333936)
citrus-it Nov 28, 2022
12f5db0
16768 kernel printf should know about %j and %z size specifiers
citrus-it Oct 15, 2024
b86befb
Avoid undefined symbols when using the dragonfly locale backend
Bill-Sommerfeld May 9, 2025
306e1b8
Handle a few cases where fields in struct lconv may contain multi-byt…
Bill-Sommerfeld May 18, 2025
6cf0454
Let --enable-clocale=dragonfly work as a configure option
Bill-Sommerfeld May 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ STAGEautofeedback_TFLAGS = $(STAGE3_TFLAGS)
# may result in additional warnings.
STAGEautofeedback_CONFIGURE_FLAGS = $(filter-out --enable-werror-always,$(STAGE_CONFIGURE_FLAGS))

do-compare = @do_compare@
do-compare = $(srcdir)/contrib/compare-debug $$f1 $$f2
do-compare3 = $(do-compare)

# -----------------------------------------------
Expand Down
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
This is the GCC used for compiling illumos.

The `il-*` branches contain the the patches used for building illumos, which
are rebased versions of those used for Solaris/OpenSolaris, and then
additional changes. The versions actually in use are tagged with
`il-VERSION-ilN` where _N_ version the illumos changes over the GCC version in
question.

The `wip/*` branches are works in progress and _should never be used_

The `codesourcery/*` and `sun/*` branches contain the original GCCs as patched by
CodeSourcery and Sun Microsystems for use compiling Solaris and OpenSolaris as
was, and the GCCFSS patches of Sun's

When building the compilers for illumos use the flags generally used are:

i386
~~~sh
../../configure --prefix=/opt/gcc/$VER --with-as=/usr/bin/gas --with-gnu-as \
--with-ld=/usr/bin/ld --without-gnu-ld --enable-languages="c,c++,objc" \
--enable-shared --with-mpfr-include=/usr/include/mpfr \
--with-gmp-include=/usr/include/gmp \
--with-pkgversion="Illumos $(git describe --all)" \
--with-bugurl="http://github.com/richlowe/gcc/issues"
~~~

sparc
~~~sh
../../configure --prefix=/opt/gcc/$VER --without-gnu-as --with-as=/usr/ccs/bin/as" \
--with-ld=/usr/bin/ld --without-gnu-ld --enable-languages="c,c++,objc" \
--enable-shared --with-mpfr-include=/usr/include/mpfr \
--with-gmp-include=/usr/include/gmp \
--with-pkgversion="Illumos $(git describe --all)" \
--with-bugurl="http://github.com/richlowe/gcc/issues"
~~~

Please use the correct `--with-bugurl` and `--with-pkgversion` flags as
appropriate for any modifications you make, but please also be sure that they
accurately describe what is in use (ie, are not left at the defaults) either.
2 changes: 1 addition & 1 deletion contrib/make_sunver.pl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# columns.

# The path to elfdump.
my $elfdump = "/usr/ccs/bin/elfdump";
my $elfdump = "/usr/bin/elfdump";

if (-f $elfdump) {
open ELFDUMP,$elfdump.' -s '.(join ' ',@OBJECTS).'|' or die $!;
Expand Down
4 changes: 2 additions & 2 deletions fixincludes/fixinc.in
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ search_dirs=""

while [ -n "$dirs" ] && [ $levels -gt 0 ]
do
levels=`expr $levels - 1`
levels=`expr $levels - 1; true`
newdirs=
for d in $dirs
do
Expand Down Expand Up @@ -340,7 +340,7 @@ if $LINKS; then
cd $LIB
while [ x$dirname != x ]; do
component=`echo $dirname | sed -e 's|/.*$||'`
mkdir $component >/dev/null 2>&1
mkdir -p $component >/dev/null 2>&1
cd $component
dirmade=$dirmade/$component
dirname=`echo $dirname | sed -e 's|[^/]*//*||'`
Expand Down
9 changes: 9 additions & 0 deletions gcc/attribs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,15 @@ decl_attributes (tree *node, tree attributes, int flags,
attributes = tree_cons (get_identifier ("no_icf"), NULL, attributes);
}

/* If the user passed -fno-clone-functions, all functions should be treated
as "noclone" */
if (TREE_CODE (*node) == FUNCTION_DECL
&& !flag_clone_functions)
{
if (lookup_attribute ("noclone", attributes) == NULL)
attributes = tree_cons (get_identifier ("noclone"), NULL, attributes);
}

targetm.insert_attributes (*node, &attributes);

/* Note that attributes on the same declaration are not necessarily
Expand Down
13 changes: 13 additions & 0 deletions gcc/common.opt
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,11 @@ fcode-hoisting
Common Var(flag_code_hoisting) Optimization
Enable code hoisting.

fclone-functions
Common Var(flag_clone_functions) Init(1)
Allow the compiler to clone functions to facilitate certain optimizations.
Enabled by default.

fcombine-stack-adjustments
Common Var(flag_combine_stack_adjustments) Optimization
Looks for opportunities to reduce stack adjustments and stack references.
Expand Down Expand Up @@ -2343,6 +2348,10 @@ fomit-frame-pointer
Common Var(flag_omit_frame_pointer) Optimization
When possible do not generate stack frames.

fforce-omit-frame-pointer
Common Var(flag_force_omit_frame_pointer) Optimization
When possible, do not generate stack frames. Hinders debugging with mdb and dtrace.

fopenmp-target-simd-clone
Common Alias(fopenmp-target-simd-clone=,any,none)

Expand Down Expand Up @@ -2931,6 +2940,10 @@ fstrict-aliasing
Common Var(flag_strict_aliasing) Optimization
Assume strict aliasing rules apply.

fstrict-calling-conventions
Common Var(flag_strict_calling_conventions) Init(1)
Use strict ABI calling conventions even for static functions

fstrict-overflow
Common
Treat signed overflow as undefined. Negated as -fwrapv -fwrapv-pointer.
Expand Down
17 changes: 17 additions & 0 deletions gcc/config/i386/i386-options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2796,6 +2796,11 @@ ix86_option_override_internal (bool main_args_p,
&= ~(OPTION_MASK_ISA2_AVX5124FMAPS | OPTION_MASK_ISA2_AVX5124VNNIW);
}

if (!TARGET_64BIT_P (opts->x_ix86_isa_flags) && TARGET_SAVE_ARGS) {
warning (0, "-msave-args only works in x32 or 64-bit mode; ignoring");
opts->x_ix86_target_flags &= ~OPTION_MASK_SAVE_ARGS;
}

/* Validate -mpreferred-stack-boundary= value or default it to
PREFERRED_STACK_BOUNDARY_DEFAULT. */
ix86_preferred_stack_boundary = PREFERRED_STACK_BOUNDARY_DEFAULT;
Expand Down Expand Up @@ -3261,6 +3266,18 @@ ix86_option_override_internal (bool main_args_p,
free (str);
}

/*
* We never want to omit the frame pointer, regardless of the optimisation
* level or options to gcc - we like stack traces too much and it is of
* questionable benefit anyway, even on i386.
*/

if (flag_force_omit_frame_pointer == 0)
{
flag_omit_frame_pointer = 0;
opts->x_flag_omit_frame_pointer = 0;
}

/* Save the initial options in case the user does function specific
options. */
if (main_args_p)
Expand Down
Loading