1 # |
1 # |
2 # We have made several changes to headers in Solaris 11/12 so that we no |
2 # We have made several changes to headers in Solaris 11/12 so that we no |
3 # longer need to "fix" them. These changes limit what we keep. |
3 # longer need to "fix" them. This patch limits what we fix and keep. |
4 # |
4 # |
5 # GCC now defines __STDC_VERSION__ by default, which doesn't appear to have |
5 # We will want to spend time going through inclhack.def to make sure that |
6 # been contemplated in sys/feature_tests.h. We need to carefully evaluate |
6 # it only targets those things that we want "fixed" in S12 and later before |
7 # changes to the Solaris system headers: |
7 # we submit anything upstream. |
8 # |
|
9 # 22602861 header assumptions may need a revisit. |
|
10 # |
|
11 # For now we want to compensate when __GNUC__ >= 5 |
|
12 # |
|
13 # This is not ready for upstream. |
|
14 # |
8 # |
15 --- gcc-5.3.0.orig/fixincludes/fixinc.in Sun Oct 28 14:42:48 2012 |
9 --- gcc-5.3.0.orig/fixincludes/fixinc.in Sun Oct 28 14:42:48 2012 |
16 +++ gcc-5.3.0/fixincludes/fixinc.in Fri Jan 22 23:13:39 2016 |
10 +++ gcc-5.3.0/fixincludes/fixinc.in Fri Jan 22 23:13:39 2016 |
17 @@ -471,6 +471,13 @@ |
11 @@ -471,6 +471,13 @@ |
18 # DOS/Windows filesystems. |
12 # DOS/Windows filesystems. |
19 find . -name '[Dd][Oo][Nn][Ee]' -exec rm -f '{}' ';' |
13 find . -name '[Dd][Oo][Nn][Ee]' -exec rm -f '{}' ';' |
20 |
14 |
21 +# We only want limits.h, syslimits.h, and sys/feature_tests.h fixed on Solaris |
15 +# We only want limits.h and syslimits.h fixed on Solaris |
22 +for file in `find . -type f | \ |
16 +for file in `find . -type f | \ |
23 + egrep -v './(limits.h|syslimits.h|sys/feature_tests.h)'` ; do |
17 + egrep -v './(limits.h|syslimits.h)'` ; do |
24 + echo Removing $file |
18 + echo Removing $file |
25 + rm -f $file |
19 + rm -f $file |
26 +done |
20 +done |
27 + |
21 + |
28 if test $VERBOSE -gt 1 |
22 if test $VERBOSE -gt 1 |
29 then echo 'Cleaning up unneeded directories:' ; fi |
23 then echo 'Cleaning up unneeded directories:' ; fi |
30 cd $LIB |
24 cd $LIB |
31 --- gcc-5.3.0/fixincludes/inclhack.def.orig Fri Aug 14 04:34:26 2015 |
|
32 +++ gcc-5.3.0/fixincludes/inclhack.def Wed Jan 20 23:29:04 2016 |
|
33 @@ -3352,6 +3352,19 @@ |
|
34 }; |
|
35 |
|
36 /* |
|
37 + * Solaris 12 <sys/feature_tests.h> tests. |
|
38 + */ |
|
39 +fix = { |
|
40 + hackname = solaris_12_invalid; |
|
41 + mach = "*-*-solaris2*"; |
|
42 + files = sys/feature_tests.h; |
|
43 + select = "#if.*_STDC_C99.*__XOPEN_OR_POSIX.*_XPG6.*"; |
|
44 + c_fix = format; |
|
45 + c_fix_arg = "%0 && \\\n\t(__GNUC__ - 0 < 5)"; |
|
46 + test_text = "#define __GNUC__ 5"; |
|
47 +}; |
|
48 + |
|
49 +/* |
|
50 * Solaris 10+ complex.h defines _Complex_I and _Imaginary_I in terms of |
|
51 * themselves, which are Sun Studio compiler intrinsics. Remove _Imaginary_I |
|
52 * and imaginary definitions which are not supported by GCC. |
|