Re: gcc 11.2
Hanspeter Niederstrasser <[email protected]>
| Newsgroups | gmane.os.apple.fink.general |
|---|---|
| Organization | Snaggled Works |
| Message-ID | <[email protected]> |
On 8/9/21 6:17 AM, Hanspeter Niederstrasser wrote: > On 7/29/21 10:09 AM, Franchetti, Giuliano Dr. wrote: >> Hello everybody, >> >> I am involved with programming, and >> I have seen the new gcc (gcc11. 2). >> >> Will Fink include this new distribution? > > I'm working on gcc11.2 now. There were issues with gcc9 and gcc10 and > 10.15 and 11, but I can't reproduce them now. > > Hanspeter Can you try the attached gcc11 package description? Save the 4 files to /opt/sw/fink/dists/local/main/finkinfo/languages (make the directories if needed). Hanspeter -- Science is like sex: sure, it may give some practical results, but that's not why we do it. --Richard Feynman _______________________________________________ Fink-users mailing list [email protected] List archive: https://sourceforge.net/p/fink/mailman/fink-users/ Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-users
gcc11.info
(text/plain, 10.8 KB)
Info2: <<
Package: gcc11
Version: 11.2.0
Revision: 1
Type: gccver (11)
Source: mirror:gnu:gcc/gcc-%v/gcc-%v.tar.xz
Source-Checksum: SHA256(d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b)
PatchFile: %n.patch
PatchFile-MD5: bf4bd5d40bff74246c2b445f62d4597f
PatchFile2: %n-apfs.patch
PatchFile2-MD5: 51a56a6c93485084669ebad4a196858a
PatchFile3: %n-build-sysroot.patch
PatchFile3-MD5: 0b24ab7a98bbc57bff2e0429e71b9102
PatchScript: <<
#!/bin/sh -ev
patch -p1 < %{PatchFile}
patch -p1 < %{PatchFile2}
patch -p1 < %{PatchFile3}
# don't update live infodoc dir
find . -name Makefile.in | xargs perl -pi -e 's/install-info --version/false/g'
<<
NoSetCPPFLAGS: True
NoSetLDFLAGS: True
UseMaxBuildJobs: True
Conflicts: <<
gcc46,
gcc47,
gcc48,
gcc49,
gcc5,
gcc6,
gcc7,
gcc8,
gcc9,
gcc10,
gcc11,
gcc12
<<
Replaces: <<
gcc46,
gcc47,
gcc48,
gcc49,
gcc5,
gcc6,
gcc7,
gcc8,
gcc9,
gcc10,
gcc11,
gcc12
<<
Depends: <<
%N-compiler (= %v-%r)
<<
BuildDepends: <<
fink (>= 0.32),
fink-package-precedence,
gettext-tools,
gmp5 (>= 6.0.0a-3),
isl22,
libgettext8-dev,
libiconv-dev,
libmpc3 (>= 1.0.3-1),
libmpfr6,
x11-dev
<<
ConfigureParams: <<
--prefix=%p/lib/gcc%type_num[gccver] \
--mandir=%p/share/man \
--infodir=%p/lib/gcc%type_num[gccver]/info \
--enable-languages=c,c++,fortran,lto,objc,obj-c++ \
--with-gmp=%p \
--with-libiconv-prefix=%p \
--with-isl=%p \
--with-mpc=%p \
--with-system-zlib \
--program-suffix=-fsf-%type_num[gccver] \
--disable-multilib \
--enable-stage1-checking \
${USE_SYSROOT} \
--with-pkgversion="Fink %n %v-%r" \
--with-bugurl="https://github.com/fink/fink-distributions/issues"
<<
InfoTest: <<
TestDepends: <<
autogen,
dejagnu,
xcode (<< 4.7) | apple-gdb
<<
TestScript: <<
#!/bin/bash -ev
if [ $UID = 0 ]; then
if [ -e /usr/bin/csrutil && `csrutil status | grep -c disabled` ]; then
cd ../darwin_objdir; make -k check RUNTESTFLAGS="--target_board=unix'{-m64}'" || :
else
echo "The gcc testsuite must be run with SIP disabled or package installed."
exit 0
fi
else
echo "The gcc testsuite must be run as root due to its use of gdb."
exit 0
fi
<<
<<
InfoDocs: gcc.info gfortran.info cpp.info gccinstall.info libgomp.info cppinternals.info gccint.info
CompileScript: <<
#!/bin/bash -ev
set +x
if [ -e /usr/local/lib/libgmp.a ] || [ -e /usr/local/lib/libgmp.dylib ]; then
echo "-----WARNING-----WARNING-----WARNING-----"
echo "You seem to have GMP installed in /usr/local."
echo "This is known to cause %N to fail to build."
echo "Please move aside /usr/local and try again."
echo "-----WARNING-----WARNING-----WARNING-----"
exit 1
else
echo "Good, /usr/local/lib/libgmp* not present."
fi
set -x
ulimit -s `ulimit -s`
mkdir ../darwin_objdir
cd ../darwin_objdir
# build doesn't play well with GNU-make
# unsupported option '-static-libgcc'
export MAKE=/usr/bin/make
# Only need sysroot on 10.14+ because /usr/include has been removed
OSX_MAJOR_VERSION=`sw_vers -productVersion | cut -d. -f1-2`
if dpkg --compare-versions "$OSX_MAJOR_VERSION" ge "10.14"; then
# Get the unversioned SDK path
SDK_PATH=`dirname $(xcrun --sdk macosx --show-sdk-path)`/MacOSX.sdk
# This should really be --with-build-sysroot but that's not getting propagated through the entire build process.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79885
export USE_SYSROOT="--with-sysroot=${SDK_PATH}"
fi
# check for incompatible clang ( 6.0 << bad-clang << 7.2)
clangvers=`clang --version | cut -d\ -f4`
$(`dpkg --compare-versions $clangvers '>>' 6.0`) && $(`dpkg --compare-versions $clangvers '<<' 7.2`) && clangcheck='y'
if [ "$clangcheck" = "y" ]; then
../gcc-%v/configure %c --with-build-config=bootstrap-debug
else
../gcc-%v/configure %c
fi
# Use bootstrap-lean to reduce disk usage.
# Note that this causes plugin testsuite failures
# since the plugin headers must come from prev-gcc.
# make bootstrap-lean
make bootstrap
fink-package-precedence --prohibit-bdep=%n .
<<
InstallScript: <<
#!/bin/sh -ev
darwinvers=`uname -r`
cd ../darwin_objdir
make -j 1 install DESTDIR=%d
mkdir -p %i/bin
# Add symlinks to recreate previous naming of executables in %p/bin
# as well as %p/lib/gcc%type_num[gccver]/bin and new -fsf-%type_num[gccver] naming in %p/bin.
binfiles="gcc g++ c++ cpp gcov"
for binfile in $binfiles ; do
ln -s %p/lib/gcc%type_num[gccver]/bin/$binfile-fsf-%type_num[gccver] %i/lib/gcc%type_num[gccver]/bin/$binfile-%type_num[gccver]
ln -s %p/lib/gcc%type_num[gccver]/bin/$binfile-fsf-%type_num[gccver] %i/bin/$binfile-%type_num[gccver]
ln -s %p/lib/gcc%type_num[gccver]/bin/$binfile-fsf-%type_num[gccver] %i/bin/$binfile-fsf-%type_num[gccver]
done
binfiles="gfortran"
for binfile in $binfiles ; do
ln -s %p/lib/gcc%type_num[gccver]/bin/$binfile-fsf-%type_num[gccver] %i/lib/gcc%type_num[gccver]/bin/$binfile
ln -s %p/lib/gcc%type_num[gccver]/bin/$binfile-fsf-%type_num[gccver] %i/bin/$binfile
ln -s %p/lib/gcc%type_num[gccver]/bin/$binfile-fsf-%type_num[gccver] %i/bin/$binfile-fsf-%type_num[gccver]
done
# Remove unsupported executables
binfiles="gcc-ar gcc-nm gcc-ranlib"
for binfile in $binfiles ; do
rm -f %i/lib/gcc%type_num[gccver]/bin/$binfile-fsf-%type_num[gccver] %i/lib/gcc%type_num[gccver]/bin/%m-apple-darwin`uname -r`-$binfile-fsf-%type_num[gccver]
done
# Add symlinks for manpages under old names.
man1files="cpp g++ gcc gcov"
for man1file in $man1files ; do
ln -s $man1file-fsf-%type_num[gccver].1 %i/share/man/man1/$man1file-%type_num[gccver].1
done
man1files="gfortran"
for man1file in $man1files ; do
ln -s $man1file-fsf-%type_num[gccver].1 %i/share/man/man1/$man1file.1
done
# Rename manpages with -fsf-%type_num[gccver] suffix and create symlinks to old names.
man7files="fsf-funding gfdl gpl"
for man7file in $man7files ; do
mv %i/share/man/man7/$man7file.7 %i/share/man/man7/$man7file-fsf-%type_num[gccver].7
ln -s $man7file-fsf-%type_num[gccver].7 %i/share/man/man7/$man7file.7
done
# Add dir for installed info files, and link them to %i/share/info.
# the %i/lib/gcc%type_num[gccver]/info/* files will go into the -compiler package
# and the files in %i/share/info go into the main package, this allows
# the info files for specific compiler versions to be accessed with
# e.g. `info -d /fink_install_dir/lib/gcc%type_num[gccver]/info gcc', but the "main" info files will
# be available for the install gccXX package in %p/share/info, as usual
install -d -m 755 %i/share/info
for infofile in $(find %i/lib/gcc%type_num[gccver]/info -name '*.info*'); do
infobase=$(basename $infofile)
case $infofile in
*info) /usr/bin/install-info --infodir=%i/lib/gcc%type_num[gccver]/info ${infofile} ;;
esac
ln -s %p/lib/gcc%type_num[gccver]/info/$infobase %i/share/info/$infobase
done
cp %b/gcc/config/darwin-sections.def %i/lib/gcc%type_num[gccver]/lib/gcc/%m-apple-darwin${darwinvers}/%v/plugin/include/config
# remove build path from .la files
perl -pi -e "s, \-L[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find %i/lib/gcc%type_num[gccver]/lib -name '*.la'`
perl -pi -e "s, /[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find %i/lib/gcc%type_num[gccver]/lib -name 'libasan.la'`
perl -pi -e "s, /[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find %i/lib/gcc%type_num[gccver]/lib -name 'libubsan.la'`
<<
SplitOff: <<
Package: %N-shlibs
Replaces: <<
gcc4 (<= 20050130-4),
gfortran-shlibs
<<
Provides: <<
gfortran-shlibs
<<
Description: Shared libraries for %N
DocFiles: gcc/COPYING gcc/COPYING.LIB
Files: <<
lib/gcc%type_num[gccver]/lib/libgfortran.5*.dylib
lib/gcc%type_num[gccver]/lib/libstdc++.6*.dylib
lib/gcc%type_num[gccver]/lib/libgcc_s.1*.dylib
lib/gcc%type_num[gccver]/lib/libgcc_ext.1*.dylib
lib/gcc%type_num[gccver]/lib/libitm.1*.dylib
lib/gcc%type_num[gccver]/lib/libssp.0*.dylib
lib/gcc%type_num[gccver]/lib/libobjc-gnu.4*.dylib
lib/gcc%type_num[gccver]/lib/libgomp.1*.dylib
lib/gcc%type_num[gccver]/lib/libquadmath.0*.dylib
lib/gcc%type_num[gccver]/lib/libatomic.1*.dylib
lib/gcc%type_num[gccver]/lib/libasan.6*.dylib
lib/gcc%type_num[gccver]/lib/libubsan.1*.dylib
<<
Shlibs: <<
%p/lib/gcc%type_num[gccver]/lib/libgfortran.5.dylib 6.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libstdc++.6.dylib 7.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libgcc_s.1.dylib 1.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libitm.1.dylib 2.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libssp.0.dylib 1.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libobjc-gnu.4.dylib 5.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libgomp.1.dylib 2.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libquadmath.0.dylib 1.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libatomic.1.dylib 4.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libasan.6.dylib 7.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libubsan.1.dylib 2.0.0 %n (>= 10.1.0-1)
<<
<<
SplitOff2: <<
Package: %N-compiler
Depends: <<
gmp5-shlibs (>= 6.0.0a-3),
isl22-shlibs,
libgettext8-shlibs,
libgmpxx5-shlibs (>= 6.0.0a-3),
libiconv,
libmpc3-shlibs (>= 1.0.3-1),
libmpfr6-shlibs,
%N-shlibs (= %v-%r)
<<
BuildDependsOnly: False
Description: Compiler Binaries for gcc%type_num[gccver]
DocFiles: gcc/COPYING gcc/COPYING.LIB
Files: <<
bin/*-fsf-%type_num[gccver]
lib/gcc%type_num[gccver]
share/man/man1/*-fsf-%type_num[gccver].1
share/man/man7/*-fsf-%type_num[gccver].7
<<
<<
License: GPL
Description: GNU Compiler Collection Version %type_num[gccver]
DescDetail: <<
GCC, the GNU Compiler Collection, includes front ends for
C, C++, Objective-C, Objective-C++, Fortran and Ada.
.
C, C++, Objective C and Fortran are included in this package.
.
The C and C++ compilers are named gcc-10 and g++-10 to avoid
conflicts with gcc and g++ installed by the Apple Developer Tools
<<
DescPackaging: <<
Build with -fsf-%type_num[gccver] suffix and place non-overlapping files into new gcc%type_num[gccver]-compiler
package which can co-exist with other gccXX-compiler packages. Overlapping files
are left in main gcc%type_num[gccver] package which still conflicts with other gccXX packages.
Add apfs patch to suppress https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797
by adding ".NOTPARALLEL: install-headers" to libstdc++-v3/include/Makefile.in.
macOS10.14 no longer supports building 32bit libraries, so must disable multilib.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87030
We use --with-sysroot to find the hidden system-headers in case /usr/include is not
populated. Ideally want --with-build-sysroot because we only need the headers to build
gcc and that should not impact the end product, but then anything using gccX will
need to add it's own -isysroot flag.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79885
<<
Homepage: http://gcc.gnu.org/
Maintainer: None <[email protected]>
<<
gcc11.patch
(text/plain, 1.2 KB)
diff -ruN gcc-11.2.0-orig/gcc/config/darwin.h gcc-11.2.0/gcc/config/darwin.h
--- gcc-11.2.0-orig/gcc/config/darwin.h 2021-07-28 01:55:07.000000000 -0500
+++ gcc-11.2.0/gcc/config/darwin.h 2021-08-07 12:05:25.000000000 -0500
@@ -1081,9 +1081,8 @@
darwin_driver_init (&decoded_options_count, &decoded_options)
#endif
-/* The Apple assembler and linker do not support constructor priorities. */
-#undef SUPPORTS_INIT_PRIORITY
-#define SUPPORTS_INIT_PRIORITY 0
+/* While the Apple assembler and linker do not support constructor priorities,
+ intra-module priority support is available through sort_cdtor_records. */
#undef STACK_CHECK_STATIC_BUILTIN
#define STACK_CHECK_STATIC_BUILTIN 1
diff -ruN gcc-11.2.0-orig/gcc/testsuite/g++.dg/special/conpr-3.C gcc-11.2.0/gcc/testsuite/g++.dg/special/conpr-3.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/special/conpr-3.C 2021-07-28 01:55:07.000000000 -0500
+++ gcc-11.2.0/gcc/testsuite/g++.dg/special/conpr-3.C 2021-08-07 12:05:25.000000000 -0500
@@ -1,5 +1,6 @@
/* { dg-do run { target init_priority } } */
/* { dg-additional-sources "conpr-3a.cc conpr-3b.cc" } */
+/* { dg-shouldfail "No inter-module priority support" { *-apple-darwin* } } */
#include <stdlib.h>
gcc11-apfs.patch
(text/plain, 699 B)
diff -ruN gcc-10.1.0-orig/libstdc++-v3/include/Makefile.in gcc-10.1.0/libstdc++-v3/include/Makefile.in --- gcc-10.1.0-orig/libstdc++-v3/include/Makefile.in 2020-05-07 05:50:02.000000000 -0500 +++ gcc-10.1.0/libstdc++-v3/include/Makefile.in 2020-05-09 13:25:43.000000000 -0500 @@ -1851,6 +1851,8 @@ @GLIBCXX_HOSTED_TRUE@install-data-local: install-headers @GLIBCXX_HOSTED_FALSE@install-data-local: install-freestanding-headers +.NOTPARALLEL: install-headers + # This is a subset of the full install-headers rule. We only need <ciso646>, # <cstddef>, <cfloat>, <limits>, <climits>, <version>, <cstdint>, <cstdlib>, # <new>, <typeinfo>, <exception>, <initializer_list>, <cstdalign>, <cstdarg>,
gcc11-build-sysroot.patch
(text/plain, 3.3 KB)
diff -ruN gcc-10.1.0-orig/Makefile.in gcc-10.1.0/Makefile.in --- gcc-10.1.0-orig/Makefile.in 2020-05-07 05:49:58.000000000 -0500 +++ gcc-10.1.0/Makefile.in 2020-05-09 13:27:34.000000000 -0500 @@ -234,6 +234,7 @@ @endif gcc-bootstrap $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); + POSTSTAGE1_CXX_EXPORT = \ CXX='$(CXX)'; export CXX; \ CXX_FOR_BUILD='$(CXX_FOR_BUILD)'; export CXX_FOR_BUILD; @@ -248,11 +249,13 @@ `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \ `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$s/libstdc++-v3/libsupc++ \ -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \ - -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs"; \ - export CXX; \ + -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \ + $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS "; export CXX; \ CXX_FOR_BUILD="$$CXX"; export CXX_FOR_BUILD; @endif target-libstdc++-v3-bootstrap +POSTSTAGE1_LDFLAGS += $(SYSROOT_CFLAGS_FOR_TARGET) + # Similar, for later GCC stages. POSTSTAGE1_HOST_EXPORTS = \ $(HOST_EXPORTS) \ @@ -616,8 +619,6 @@ CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@ CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@ -LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) -LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@ GOCFLAGS_FOR_TARGET = -O2 -g GDCFLAGS_FOR_TARGET = -O2 -g @@ -627,6 +628,12 @@ DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@ XGCC_FLAGS_FOR_TARGET = $(FLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET) +LDFLAGS_FOR_TARGET += $(SYSROOT_CFLAGS_FOR_TARGET) +CFLAGS_FOR_TARGET += $(SYSROOT_CFLAGS_FOR_TARGET) +CXXFLAGS_FOR_TARGET += $(SYSROOT_CFLAGS_FOR_TARGET) +CPPFLAGS_FOR_TARGET += $(SYSROOT_CFLAGS_FOR_TARGET) +LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) +LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates # ------------------------------------ # Miscellaneous targets and flag lists diff -ruN gcc-10.1.0-orig/gcc/Makefile.in gcc-10.1.0/gcc/Makefile.in --- gcc-10.1.0-orig/gcc/Makefile.in 2020-05-07 05:49:59.000000000 -0500 +++ gcc-10.1.0/gcc/Makefile.in 2020-05-09 13:27:34.000000000 -0500 @@ -3968,7 +3968,7 @@ @echo "set HOSTCXXFLAGS \"$(CXXFLAGS)\"" >> ./site.tmp # TEST_ALWAYS_FLAGS are flags that should be passed to every compilation. # They are passed first to allow individual tests to override them. - @echo "set TEST_ALWAYS_FLAGS \"$(SYSROOT_CFLAGS_FOR_TARGET)\"" >> ./site.tmp + @echo "set TEST_ALWAYS_FLAGS \"\"" >> ./site.tmp # When running the tests we set GCC_EXEC_PREFIX to the install tree so that # files that have already been installed there will be found. The -B option # overrides it, so use of GCC_EXEC_PREFIX will not result in using GCC files diff -ruN gcc-10.1.0-orig/gcc/ada/gcc-interface/Makefile.in gcc-10.1.0/gcc/ada/gcc-interface/Makefile.in --- gcc-10.1.0-orig/gcc/ada/gcc-interface/Makefile.in 2020-05-07 05:49:59.000000000 -0500 +++ gcc-10.1.0/gcc/ada/gcc-interface/Makefile.in 2020-05-09 13:27:34.000000000 -0500 @@ -376,6 +376,7 @@ "GNATLINK=$(GNATLINK)" \ "GNATBIND=$(GNATBIND)" +GCC_LINK_FLAGS += $(SYSROOT_CFLAGS_FOR_TARGET) GCC_LINK=$(CXX) $(GCC_LINK_FLAGS) $(LDFLAGS) # Build directory for the tools. Let's copy the target-dependent