mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
gcc: rename recipe.
This commit is contained in:
@@ -13,7 +13,7 @@ LICENSE="
|
||||
"
|
||||
COPYRIGHT="1988-2015 Free Software Foundation, Inc."
|
||||
|
||||
PATCHES="gcc_trunk.patchset"
|
||||
PATCHES="gcc6-6.0.0_2015_07_17.patchset"
|
||||
|
||||
ARCHITECTURES="!x86 x86_64 arm"
|
||||
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||
@@ -30,7 +30,7 @@ libgccSoVersion="1"
|
||||
libgccLibVersion="1"
|
||||
|
||||
PROVIDES="
|
||||
gcc$secondaryArchSuffix = $portVersion compat >= 6
|
||||
gcc6$secondaryArchSuffix = $portVersion compat >= 6
|
||||
cmd:c++$secondaryArchSuffix = $portVersion compat >= 6
|
||||
cmd:cc$secondaryArchSuffix = $portVersion compat >= 6
|
||||
cmd:cpp$secondaryArchSuffix = $portVersion compat >= 6
|
||||
@@ -45,11 +45,13 @@ REQUIRES="
|
||||
lib:libgmp$secondaryArchSuffix
|
||||
lib:libmpfr$secondaryArchSuffix
|
||||
lib:libmpc$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
devel:libgmp$secondaryArchSuffix
|
||||
devel:libmpc$secondaryArchSuffix
|
||||
devel:libmpfr$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
@@ -73,8 +75,7 @@ sourceDir=$(pwd)
|
||||
relativeInstallDir="develop/tools$secondaryArchSubDir"
|
||||
installDir="$prefix/$relativeInstallDir"
|
||||
objectsDir=$(pwd)/../${portVersionedName}-obj
|
||||
#gccVersion=$(echo $portVersion | cut -d_ -f1)
|
||||
gccVersion=6.0.0
|
||||
gccVersion=$(echo $portVersion | cut -d_ -f1)
|
||||
|
||||
BUILD()
|
||||
{
|
||||
@@ -112,7 +113,7 @@ BUILD()
|
||||
--enable-version-specific-runtime-libs \
|
||||
--enable-languages=c,c++ --enable-lto --enable-frame-pointer \
|
||||
--with-pkgversion=$(echo $portVersion | cut -d_ -f2-) \
|
||||
--enable-__cxa-atexit \
|
||||
--enable-__cxa-atexit --with-system-zlib \
|
||||
$additionalConfigureFlags
|
||||
|
||||
make $jobArgs
|
||||
@@ -307,7 +308,7 @@ distribution. This package contains the shared libraries for the runtime \
|
||||
loader, so it is required for executing most c/c++ programs."
|
||||
|
||||
PROVIDES_syslibs="
|
||||
gcc_syslibs$secondaryArchSuffix = $portVersion compat >= 6
|
||||
gcc6_syslibs$secondaryArchSuffix = $portVersion compat >= 6
|
||||
lib:libgcc_s$secondaryArchSuffix = $portVersion compat >= 6
|
||||
lib:libstdc++$secondaryArchSuffix = $portVersion compat >= 6
|
||||
lib:libsupc++$secondaryArchSuffix = $portVersion compat >= 6
|
||||
@@ -324,6 +325,6 @@ contains the set of gcc's C/C++-runtime libraries and headers that is \
|
||||
required by Haiku's build system when building Haiku."
|
||||
|
||||
PROVIDES_syslibs_devel="
|
||||
gcc_syslibs_devel$secondaryArchSuffix = $portVersion compat >= 6
|
||||
gcc6_syslibs_devel$secondaryArchSuffix = $portVersion compat >= 6
|
||||
"
|
||||
REQUIRES_syslibs_devel=""
|
||||
@@ -1,7 +1,7 @@
|
||||
From 1a5af84587b06919ca12d444542e3ce9835e6be6 Mon Sep 17 00:00:00 2001
|
||||
From 2dad18e402ac13ec74ab93e07e9f1b3690e5eb6b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com>
|
||||
Date: Sun, 19 Jul 2015 18:55:34 +0200
|
||||
Subject: [PATCH 1/2] Haiku patch
|
||||
Subject: [PATCH 1/3] Haiku patch
|
||||
|
||||
---
|
||||
compile | 0
|
||||
@@ -9,12 +9,12 @@ Subject: [PATCH 1/2] Haiku patch
|
||||
config/acx.m4 | 36 +--
|
||||
configure.ac | 12 +
|
||||
gcc/Makefile.in | 12 +-
|
||||
gcc/config.gcc | 43 ++++
|
||||
gcc/config.host | 2 +-
|
||||
gcc/config.gcc | 48 ++++
|
||||
gcc/config.host | 8 +-
|
||||
gcc/config/arm/haiku.h | 80 ++++++
|
||||
gcc/config/arm/t-haiku | 21 ++
|
||||
gcc/config/haiku-stdint.h | 55 +++++
|
||||
gcc/config/haiku.h | 215 +++++++++++++++++
|
||||
gcc/config/haiku.h | 221 +++++++++++++++++
|
||||
gcc/config/i386/haiku.h | 77 ++++++
|
||||
gcc/config/i386/haiku64.h | 135 +++++++++++
|
||||
gcc/config/i386/host-cygwin.c | 0
|
||||
@@ -26,12 +26,12 @@ Subject: [PATCH 1/2] Haiku patch
|
||||
gcc/config/rs6000/haiku.h | 59 +++++
|
||||
gcc/config/t-haiku | 4 +
|
||||
gcc/configure.ac | 21 +-
|
||||
gcc/defaults.h | 4 +
|
||||
gcc/defaults.h | 3 +-
|
||||
gcc/ginclude/stdarg.h | 2 +-
|
||||
gcc/ginclude/stddef.h | 10 +-
|
||||
include/filenames.h | 2 +
|
||||
libgcc/Makefile.in | 6 +
|
||||
libgcc/config.host | 28 ++-
|
||||
libgcc/config.host | 30 ++-
|
||||
libgcc/config/i386/t-cygming | 0
|
||||
libgcc/config/t-haiku | 3 +
|
||||
libgcc/crtstuff.c | 2 +
|
||||
@@ -44,7 +44,7 @@ Subject: [PATCH 1/2] Haiku patch
|
||||
libstdc++-v3/crossconfig.m4 | 41 ++++
|
||||
libstdc++-v3/libsupc++/tinfo.cc | 9 +
|
||||
libtool.m4 | 14 +-
|
||||
40 files changed, 1742 insertions(+), 35 deletions(-)
|
||||
40 files changed, 1757 insertions(+), 38 deletions(-)
|
||||
mode change 100755 => 100644 compile
|
||||
create mode 100644 gcc/config/arm/haiku.h
|
||||
create mode 100644 gcc/config/arm/t-haiku
|
||||
@@ -223,7 +223,7 @@ index bf2186a..4ecc2c7 100644
|
||||
cppbuiltin.o: $(BASEVER)
|
||||
|
||||
diff --git a/gcc/config.gcc b/gcc/config.gcc
|
||||
index d6b928d..10696d6 100644
|
||||
index d6b928d..3ac770b 100644
|
||||
--- a/gcc/config.gcc
|
||||
+++ b/gcc/config.gcc
|
||||
@@ -699,6 +699,19 @@ case ${target} in
|
||||
@@ -292,7 +292,19 @@ index d6b928d..10696d6 100644
|
||||
mcore-*-elf)
|
||||
tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
|
||||
tmake_file=mcore/t-mcore
|
||||
@@ -2358,6 +2396,11 @@ powerpc-*-eabi*)
|
||||
@@ -2024,6 +2062,11 @@ mips*-mti-linux*)
|
||||
gnu_ld=yes
|
||||
gas=yes
|
||||
;;
|
||||
+mipsel-*-haiku*)
|
||||
+ target_cpu_default="MASK_ABICALLS"
|
||||
+ tm_file="elfos.h ${tm_file} haiku.h mips/haiku.h"
|
||||
+ tmake_file="${tmake_file} mips/t-elf t-haiku"
|
||||
+ ;;
|
||||
mips*-*-linux*) # Linux MIPS, either endian.
|
||||
tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h"
|
||||
extra_options="${extra_options} linux-android.opt"
|
||||
@@ -2358,6 +2401,11 @@ powerpc-*-eabi*)
|
||||
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
|
||||
use_gcc_stdint=wrap
|
||||
;;
|
||||
@@ -305,7 +317,7 @@ index d6b928d..10696d6 100644
|
||||
tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
|
||||
extra_options="${extra_options} rs6000/sysv4.opt"
|
||||
diff --git a/gcc/config.host b/gcc/config.host
|
||||
index 4e456a1..a02ddb4 100644
|
||||
index 4e456a1..a48bc49 100644
|
||||
--- a/gcc/config.host
|
||||
+++ b/gcc/config.host
|
||||
@@ -107,7 +107,7 @@ case ${host} in
|
||||
@@ -317,6 +329,20 @@ index 4e456a1..a02ddb4 100644
|
||||
case ${target} in
|
||||
arm*-*-*)
|
||||
host_extra_gcc_objs="driver-arm.o"
|
||||
@@ -133,9 +133,11 @@ case ${host} in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
- mips*-*-linux*)
|
||||
+ mips*-*-linux* \
|
||||
+ | mips*-*-haiku* )
|
||||
case ${target} in
|
||||
- mips*-*-linux*)
|
||||
+ mips*-*-linux* \
|
||||
+ | mips*-*-haiku* )
|
||||
host_extra_gcc_objs="driver-native.o"
|
||||
host_xmake_file="${host_xmake_file} mips/x-native"
|
||||
;;
|
||||
diff --git a/gcc/config/arm/haiku.h b/gcc/config/arm/haiku.h
|
||||
new file mode 100644
|
||||
index 0000000..f0c0d63
|
||||
@@ -493,10 +519,10 @@ index 0000000..8f702d0
|
||||
+#define UINTPTR_TYPE "long unsigned int"
|
||||
diff --git a/gcc/config/haiku.h b/gcc/config/haiku.h
|
||||
new file mode 100644
|
||||
index 0000000..0331d2d
|
||||
index 0000000..2aa4b2b
|
||||
--- /dev/null
|
||||
+++ b/gcc/config/haiku.h
|
||||
@@ -0,0 +1,215 @@
|
||||
@@ -0,0 +1,221 @@
|
||||
+/* Definitions of target machine for GCC.
|
||||
+ Common Haiku definitions for all architectures.
|
||||
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005
|
||||
@@ -707,6 +733,12 @@ index 0000000..0331d2d
|
||||
+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp}"
|
||||
+#endif
|
||||
+
|
||||
+/* no JCR_SECTION_NAME default definition for Haiku */
|
||||
+#define TARGET_NO_JCR_SECTION_NAME 1
|
||||
+
|
||||
+/* Do not use JCR_SECTION_NAME default definition for Haiku */
|
||||
+#define TARGET_NO_JCR_SECTION_NAME 1
|
||||
+
|
||||
+/* Do not desire to have _Jv_RegisterClasses in crtbegin.o for Haiku */
|
||||
+#define TARGET_USE_JCR_SECTION 0
|
||||
+
|
||||
@@ -1414,23 +1446,19 @@ index bc574db..3b6bcdf 100644
|
||||
target_thread_file=${enable_threads}
|
||||
;;
|
||||
diff --git a/gcc/defaults.h b/gcc/defaults.h
|
||||
index 9d38ba1..1d81f75 100644
|
||||
index 9d38ba1..64e0ae1 100644
|
||||
--- a/gcc/defaults.h
|
||||
+++ b/gcc/defaults.h
|
||||
@@ -397,9 +397,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -395,7 +395,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
/* If we have named section and we support weak symbols, then use the
|
||||
.jcr section for recording java classes which need to be registered
|
||||
at program start-up time. */
|
||||
#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
|
||||
-#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
|
||||
+#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK \
|
||||
+ && !defined(TARGET_NO_JCR_SECTION_NAME)
|
||||
#ifndef JCR_SECTION_NAME
|
||||
+/* Hack to remove _Jv crap on BeOS. i know it should be made somehow through
|
||||
+ config files, but i don't know how (in which file ;) */
|
||||
+#if !defined(__BEOS__) && !defined(__HAIKU__)
|
||||
#define JCR_SECTION_NAME ".jcr"
|
||||
#endif
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* This decision to use a .jcr section can be overridden by defining
|
||||
USE_JCR_SECTION to 0 in target file. This is necessary if target
|
||||
diff --git a/gcc/ginclude/stdarg.h b/gcc/ginclude/stdarg.h
|
||||
index afc1cc5..1d3ef09 100644
|
||||
--- a/gcc/ginclude/stdarg.h
|
||||
@@ -1531,7 +1559,7 @@ index 527d87b..37231e7 100644
|
||||
ifneq (,$(vis_hide))
|
||||
|
||||
diff --git a/libgcc/config.host b/libgcc/config.host
|
||||
index 3a2c75d..591158f 100644
|
||||
index 3a2c75d..2ed565c 100644
|
||||
--- a/libgcc/config.host
|
||||
+++ b/libgcc/config.host
|
||||
@@ -99,7 +99,7 @@ arm*-*-*)
|
||||
@@ -1602,7 +1630,16 @@ index 3a2c75d..591158f 100644
|
||||
m68k-*-elf* | fido-*-elf)
|
||||
tmake_file="$tmake_file m68k/t-floatlib"
|
||||
;;
|
||||
@@ -995,6 +1017,8 @@ powerpc*-*-freebsd*)
|
||||
@@ -865,6 +887,8 @@ mips*-sde-elf*)
|
||||
esac
|
||||
extra_parts="$extra_parts crti.o crtn.o"
|
||||
;;
|
||||
+mipsel-*-haiku*)
|
||||
+ ;;
|
||||
mipsisa32-*-elf* | mipsisa32el-*-elf* | \
|
||||
mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
|
||||
mipsisa32r6-*-elf* | mipsisa32r6el-*-elf* | \
|
||||
@@ -995,6 +1019,8 @@ powerpc*-*-freebsd*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -2367,10 +2404,10 @@ index 4b2d30a..47ff8f5 100644
|
||||
--
|
||||
2.1.0
|
||||
|
||||
From 47af81a66a89deb181d7a2ede20033a0156a77d1 Mon Sep 17 00:00:00 2001
|
||||
From 27eb21c5daeff1754943be89313d8e821890e4e8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com>
|
||||
Date: Tue, 21 Jul 2015 18:45:53 +0200
|
||||
Subject: [PATCH 2/2] Haiku: regenerate configure.
|
||||
Subject: [PATCH 2/3] Haiku: regenerate configure.
|
||||
|
||||
---
|
||||
configure | 48 +++++++++++++-------
|
||||
@@ -2865,3 +2902,39 @@ index e9521d6..fbb543a 100755
|
||||
--
|
||||
2.1.0
|
||||
|
||||
From 118753e9e20e1bd0ee46392be3cb92b34a4d35f8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com>
|
||||
Date: Mon, 27 Jul 2015 16:32:32 +0200
|
||||
Subject: [PATCH 3/3] Haiku: disable -fno-PIE as this fails on x86_64.
|
||||
|
||||
---
|
||||
gcc/Makefile.in | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
|
||||
index 4ecc2c7..bc5b741 100644
|
||||
--- a/gcc/Makefile.in
|
||||
+++ b/gcc/Makefile.in
|
||||
@@ -259,7 +259,7 @@ LINKER_FLAGS = $(CFLAGS)
|
||||
endif
|
||||
|
||||
# We don't want to compile the compilers with -fPIE, it make PCH fail.
|
||||
-COMPILER += @NO_PIE_CFLAGS@
|
||||
+#COMPILER += @NO_PIE_CFLAGS@
|
||||
|
||||
# Link with -no-pie since we compile the compiler with -fno-PIE.
|
||||
LINKER += @NO_PIE_FLAG@
|
||||
@@ -757,8 +757,8 @@ CC_FOR_BUILD = @CC_FOR_BUILD@
|
||||
CXX_FOR_BUILD = @CXX_FOR_BUILD@
|
||||
BUILD_CFLAGS= @BUILD_CFLAGS@ -DGENERATOR_FILE
|
||||
BUILD_CXXFLAGS = @BUILD_CXXFLAGS@ -DGENERATOR_FILE
|
||||
-BUILD_CFLAGS += @NO_PIE_CFLAGS@
|
||||
-BUILD_CXXFLAGS += @NO_PIE_CFLAGS@
|
||||
+#BUILD_CFLAGS += @NO_PIE_CFLAGS@
|
||||
+#BUILD_CXXFLAGS += @NO_PIE_CFLAGS@
|
||||
|
||||
# Native compiler that we use. This may be C++ some day.
|
||||
COMPILER_FOR_BUILD = $(CXX_FOR_BUILD)
|
||||
--
|
||||
2.1.0
|
||||
|
||||
Reference in New Issue
Block a user