Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
44b345a
README.md: Add a simple description of what's what
richlowe Apr 17, 2011
dd24885
Restore linking against -lsocket -lnsl
citrus-it Mar 2, 2026
91d5fa4
gcc: enable the .eh_frame based unwinder
richlowe Mar 5, 2014
bee8855
intl: Don't use UTF-8 quotes. Ever.
richlowe Mar 11, 2014
7c21c59
Implement -fstrict-calling-conventions
richlowe Oct 27, 2012
e17c059
allow the global disabling of function cloning
richlowe Sep 30, 2012
ca70d23
strict-cc2: check that disabling function cloning prevents constant p…
richlowe Mar 4, 2014
4445af3
sol2: enable full __cxa_atexit support
richlowe Mar 4, 2014
a0a49b4
i386: Save integer-passed arguments to the stack, to aid debuggers.
richlowe Jan 24, 2016
9990f65
16 update cmn_err format specifier
Nov 5, 2016
7dc4bf5
19 cmn_err %b conversion should accept 0 flag
Feb 13, 2017
3c35b85
We never want to omit the frame pointer, regardless of the optimisation
citrus-it Oct 25, 2018
b189546
libgo: libelf on illumos doesn't support largefile
richlowe Oct 29, 2018
8f2a939
tests: x86_64 pro_and_epilogue RTL can't work with -msave-args
richlowe May 2, 2019
8f07d2e
i386: don't assert the FP is valid during epilogue adjustment
richlowe May 3, 2019
faa54ca
gcc.target/i386/retarg: skip if msave-args
richlowe May 3, 2019
08e036e
i386: use correct error message about -msave-args and ABIs
richlowe May 3, 2019
bf41570
gcc.target/i386: skip 16bit tests when -msave-args
richlowe May 3, 2019
8a1c958
Use compare-debug to pass stage2/stage3 comparison as avx_*.o and sse…
alarcher Oct 25, 2018
e1234b6
Address fixincludes failure
alarcher Oct 25, 2018
176e2e0
Use GNU backends for gcc-{ar,nm,ranlib}
citrus-it Jul 19, 2019
81451f7
Fix libsanitizer build for illumos
alarcher Nov 12, 2019
f4a8f48
gccgo should use GNU ar
psumbera Nov 13, 2019
7fdb734
Make install-strip target work for libobjc
Nov 15, 2019
a53a8d0
i386: use the new-style retpoline thunk names for external thunks, be…
richlowe Feb 7, 2018
83f43a3
Use appropriate values objects
citrus-it Jan 7, 2020
02833b8
-G should imply the same specs as -shared
citrus-it Feb 19, 2020
0c45390
Correct path to elfdump
citrus-it Apr 10, 2020
c2edfda
Convert unsupported use of -msave-args to a warning
citrus-it Apr 11, 2020
1a22a41
Use the illumos libc SSP implementation for -fstack-protector
citrus-it Nov 4, 2020
64e0742
-zassert-deflib depends on default library paths being elided
citrus-it Jan 11, 2021
18c78b9
13726 distinguish ourselves with a macro (__illumos__)
citrus-it Apr 28, 2021
33b9728
libstdc++ must use thread-local errno
citrus-it Aug 31, 2021
a95c722
Add -fforce-omit-frame-pointer
citrus-it Oct 26, 2022
4d926d3
cmn_err() supports 'h' and 'hh' (6333936)
citrus-it Nov 28, 2022
170a169
16768 kernel printf should know about %j and %z size specifiers
citrus-it Oct 15, 2024
d57200f
Avoid undefined symbols when using the dragonfly locale backend
Bill-Sommerfeld May 9, 2025
ae7d116
Handle a few cases where fields in struct lconv may contain multi-byt…
Bill-Sommerfeld May 18, 2025
1907bdf
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 @@ -656,7 +656,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.
3 changes: 2 additions & 1 deletion c++tools/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ CXXOPTS := $(CXXFLAGS) $(PICFLAG) -fno-exceptions -fno-rtti
LDFLAGS := @LDFLAGS@
exeext := @EXEEXT@
LIBIBERTY := ../libiberty/libiberty.a
NETLIBS := @NETLIBS@
VERSION.O := ../gcc/version.o

all::
Expand Down Expand Up @@ -98,7 +99,7 @@ MAPPER.O := server.o resolver.o
CODYLIB = ../libcody/libcody.a
CXXINC += -I$(srcdir)/../libcody -I$(srcdir)/../include -I$(srcdir)/../gcc -I. -I../gcc
g++-mapper-server$(exeext): $(MAPPER.O) $(CODYLIB)
+$(CXX) $(LDFLAGS) $(PICFLAG) $(LD_PICFLAG) -o $@ $^ $(LIBIBERTY)
+$(CXX) $(LDFLAGS) $(PICFLAG) $(LD_PICFLAG) -o $@ $^ $(LIBIBERTY) $(NETLIBS)

# copy to gcc dir so tests there can run
all::../gcc/g++-mapper-server$(exeext)
Expand Down
211 changes: 211 additions & 0 deletions c++tools/configure
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ ac_includes_default="\

ac_subst_vars='LTLIBOBJS
LIBOBJS
NETLIBS
get_gcc_base_ver
EGREP
GREP
Expand Down Expand Up @@ -1669,6 +1670,52 @@ $as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_cxx_check_header_compile

# ac_fn_cxx_try_link LINENO
# -------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
}; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_retval=1
fi
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval

} # ac_fn_cxx_try_link
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
Expand Down Expand Up @@ -3719,6 +3766,170 @@ fi



# Solaris needs libsocket and libnsl for socket functions before 11.4.
# libcody uses those.
save_LIBS="$LIBS"
LIBS=

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
$as_echo_n "checking for library containing gethostbyname... " >&6; }
if ${ac_cv_search_gethostbyname+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
int
main ()
{
return gethostbyname ();
;
return 0;
}
_ACEOF
for ac_lib in '' nsl; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_search_gethostbyname=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_gethostbyname+:} false; then :
break
fi
done
if ${ac_cv_search_gethostbyname+:} false; then :

else
ac_cv_search_gethostbyname=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
$as_echo "$ac_cv_search_gethostbyname" >&6; }
ac_res=$ac_cv_search_gethostbyname
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
$as_echo_n "checking for library containing socket... " >&6; }
if ${ac_cv_search_socket+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char socket ();
int
main ()
{
return socket ();
;
return 0;
}
_ACEOF
for ac_lib in '' socket; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_search_socket=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_socket+:} false; then :
break
fi
done
if ${ac_cv_search_socket+:} false; then :

else
ac_cv_search_socket=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
$as_echo "$ac_cv_search_socket" >&6; }
ac_res=$ac_cv_search_socket
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

else

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
$as_echo_n "checking for socket in -lsocket... " >&6; }
if ${ac_cv_lib_socket_socket+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket -lnsl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char socket ();
int
main ()
{
return socket ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_socket_socket=yes
else
ac_cv_lib_socket_socket=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
$as_echo "$ac_cv_lib_socket_socket" >&6; }
if test "x$ac_cv_lib_socket_socket" = xyes; then :
LIBS="-lsocket -lnsl $LIBS"
fi

fi


NETLIBS="$LIBS"
LIBS="$save_LIBS"


ac_config_headers="$ac_config_headers config.h"

ac_config_files="$ac_config_files Makefile"
Expand Down
10 changes: 10 additions & 0 deletions c++tools/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# By default g++ uses an in-process mapper.

sinclude(../config/acx.m4)
sinclude(../config/ax_lib_socket_nsl.m4)

AC_INIT(c++tools)

Expand Down Expand Up @@ -263,6 +264,15 @@ fi
# Determine what GCC version number to use in filesystem paths.
GCC_BASE_VER

# Solaris needs libsocket and libnsl for socket functions before 11.4.
# libcody uses those.
save_LIBS="$LIBS"
LIBS=
AX_LIB_SOCKET_NSL
NETLIBS="$LIBS"
LIBS="$save_LIBS"
AC_SUBST(NETLIBS)

AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])

Expand Down
2 changes: 1 addition & 1 deletion contrib/make_sunver.pl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,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
1 change: 1 addition & 0 deletions gcc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ CPPINC = -I$(srcdir)/../libcpp/include

CODYLIB = ../libcody/libcody.a
CODYINC = -I$(srcdir)/../libcody
NETLIBS = @NETLIBS@

# Where to find decNumber
enable_decimal_float = @enable_decimal_float@
Expand Down
1 change: 1 addition & 0 deletions gcc/aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ m4_include([../ltsugar.m4])
m4_include([../ltversion.m4])
m4_include([../lt~obsolete.m4])
m4_include([../config/acx.m4])
m4_include([../config/ax_lib_socket_nsl.m4])
m4_include([../config/cet.m4])
m4_include([../config/codeset.m4])
m4_include([../config/depstand.m4])
Expand Down
9 changes: 9 additions & 0 deletions gcc/attribs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,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
Loading