gcc: Attempt fix for msys-gcc_s not getthing linked to exes

This commit is contained in:
Ray Donnelly
2014-11-02 19:28:33 +00:00
parent 4103857a94
commit 2001a72b2f
2 changed files with 38 additions and 6 deletions

View File

@@ -0,0 +1,22 @@
--- gcc-4.9.2/libgcc/config/i386/cygming-crtbegin.c.orig 2014-11-02 18:57:00.662422200 +0000
+++ gcc-4.9.2/libgcc/config/i386/cygming-crtbegin.c 2014-11-02 18:58:25.330673700 +0000
@@ -58,7 +58,9 @@
/* Work around for current cygwin32 build problems (Bug gas/16858).
Compile weak default functions only for 64-bit systems,
when absolutely necessary. */
-#ifdef __x86_64__
+/* On MSYS2, it seems we may need this fix for all arches - or else changing the specs to
+ -lgcc_s --undefined=___deregister_frame_info --undefined=___register_frame_info -lgcc
+#ifdef __x86_64__ */
TARGET_ATTRIBUTE_WEAK void
__register_frame_info (__attribute__((unused)) const void *p,
__attribute__((unused)) struct object *o)
@@ -70,7 +72,7 @@
{
return (void*) 0;
}
-#endif
+/*#endif */
#endif /* DWARF2_UNWIND_INFO */
#if TARGET_USE_JCR_SECTION

View File

@@ -17,8 +17,8 @@ makedepends=('binutils>=2.23' 'mpc-devel' 'cloog-devel' 'gmp-devel'
'mpfr-devel' 'mpc-devel' 'isl-devel' 'zlib-devel'
'windows-default-manifest')
STRIP_OPTION="strip"
#STRIP_OPTION="!strip"
options=('!emptydirs' "$STRIP_OPTION")
STRIP_OPTION="!strip"
options=('!emptydirs' "$STRIP_OPTION") # 'debug')
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
001-4.7-ada.patch
005-4.7-boehm-gc-cygwin.patch
@@ -41,7 +41,8 @@ source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
950-4.8.0-configure-msys2.patch
951-4.8.0-msys2-spec.patch
952-4.8.0-libgcc-msys2.patch
953-4.9.1-testsuite-msys2.patch)
953-4.9.1-testsuite-msys2.patch
955-4.9.2-apply-hack-so-gcc_s-isnt-stripped.patch)
md5sums=('4df8ee253b7f3863ad0b86359cd39c43'
'62c46773400b16f693d7b89f43c00433'
'170b28d7f480eec4b4721d503d96eab0'
@@ -64,7 +65,8 @@ md5sums=('4df8ee253b7f3863ad0b86359cd39c43'
'6c1e48e2723cf1df7f9c826722fda193'
'd27c17a4c6b9caadc281a4f8e204b2eb'
'7df48a22637ae227ed91fec7d43667fd'
'a0132606c8f1f2644281a208b3e69a0f')
'a0132606c8f1f2644281a208b3e69a0f'
'83c3fba38bf5167abdc85eb38ea26d24')
prepare() {
cd ${srcdir}/gcc-${pkgver}
@@ -116,6 +118,7 @@ prepare() {
patch -p1 -i ${srcdir}/951-4.8.0-msys2-spec.patch
patch -p1 -i ${srcdir}/952-4.8.0-libgcc-msys2.patch
patch -p1 -i ${srcdir}/953-4.9.1-testsuite-msys2.patch
patch -p1 -i ${srcdir}/955-4.9.2-apply-hack-so-gcc_s-isnt-stripped.patch
mkdir ${srcdir}/gcc-build
}
@@ -134,6 +137,13 @@ build() {
_arch_conf=
;;
esac
# libgcc is built with -g0, but INHIBIT_LIBC_CFLAGS can
# be used to undo that.
if check_option "debug" "y"; then
export INHIBIT_LIBC_CFLAGS="-g2"
fi
# using -pipe causes spurious test-suite failures
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
CFLAGS=${CFLAGS/-pipe/}
@@ -226,7 +236,7 @@ package_gcc()
{
pkgdesc="The GNU Compiler Collection - C and C++ frontends"
depends=("gcc-libs=$pkgver-$pkgrel" 'binutils>=2.23' 'mpc' 'cloog' 'msys2-runtime-devel' 'msys2-w32api-headers' 'msys2-w32api-runtime' 'windows-default-manifest')
options=('staticlibs' "$STRIP_OPTION")
options=('staticlibs' "$STRIP_OPTION") # '!debug')
install=gcc.install
cd ${srcdir}/gcc-build
@@ -310,7 +320,7 @@ package_gcc-fortran()
{
pkgdesc="Fortran front-end for GCC"
depends=("gcc=$pkgver-$pkgrel")
options=('staticlibs' '!emptydirs' "$STRIP_OPTION")
options=('staticlibs' '!emptydirs' "$STRIP_OPTION") # '!debug')
install=gcc-fortran.install
cd ${srcdir}/gcc-build