mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
gcc6809: update to fix build with gcc5.
This commit is contained in:
@@ -1,92 +0,0 @@
|
||||
SUMMARY="GCC compiler for Motorola 6809"
|
||||
DESCRIPTION="This is a version of the GCC compiler for the Motorla 6809. It \
|
||||
uses the lwtools as a backend. Note that there is no C library provided."
|
||||
HOMEPAGE="http://lwtools.projects.l-w.ca"
|
||||
SOURCE_URI="ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-$portVersion/gcc-$portVersion.tar.bz2"
|
||||
CHECKSUM_SHA256="8eebf51c908151d1f1a3756c8899c5e71572e8469a547ad72a1ef16a08a31b59"
|
||||
REVISION="2"
|
||||
COPYRIGHT="1988-2013 Free Software Foundation, Inc."
|
||||
LICENSE="
|
||||
GNU GPL v2
|
||||
GNU LGPL v2
|
||||
"
|
||||
PATCHES="gcc6809-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
gcc6809$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:m6809_unknown_c++$secondaryArchSuffix
|
||||
cmd:m6809_unknown_cpp$secondaryArchSuffix
|
||||
cmd:m6809_unknown_g++$secondaryArchSuffix
|
||||
cmd:m6809_unknown_gcc_$portVersion$secondaryArchSuffix
|
||||
cmd:m6809_unknown_gcc$secondaryArchSuffix
|
||||
cmd:m6809_unknown_gcov$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libmpc$secondaryArchSuffix
|
||||
lib:libmpfr$secondaryArchSuffix
|
||||
lib:libgmp$secondaryArchSuffix
|
||||
cmd:m6809_unknown_ld
|
||||
cmd:lwasm
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
devel:libgmp$secondaryArchSuffix
|
||||
devel:libmpfr$secondaryArchSuffix
|
||||
devel:libmpc$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmd:autoconf
|
||||
cmd:awk
|
||||
cmd:find
|
||||
cmd:flex
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:makeinfo
|
||||
cmd:sed
|
||||
cmd:strip
|
||||
cmd:tar
|
||||
cmd:which
|
||||
cmd:xargs
|
||||
cmd:m6809_unknown_ld
|
||||
"
|
||||
|
||||
SOURCE_DIR="gcc-$portVersion"
|
||||
|
||||
sourceDir=$(pwd)
|
||||
objectsDir=$(pwd)/../${portVersionedName}-obj
|
||||
|
||||
BUILD()
|
||||
{
|
||||
rm -rf $objectsDir
|
||||
|
||||
mkdir -p $objectsDir
|
||||
cd $objectsDir
|
||||
|
||||
# Setting a quoted string in an environment variable is ugly (the quotes
|
||||
# are removed at various stages and need an absurd amount of escaping), so
|
||||
# let's use a file and --include instead.
|
||||
echo '#define LIBRARY_PATH_ENV "M6809_LIBRARY_PATH"' > haiku_host.h
|
||||
|
||||
CXXFLAGS="-O2 -include $objectsDir/haiku_host.h" \
|
||||
CFLAGS="-O2 -include $objectsDir/haiku_host.h" \
|
||||
runConfigure $sourceDir/configure --enable-languages=c,c++ \
|
||||
--target=m6809-unknown --program-prefix=m6809-unknown- \
|
||||
--enable-obsolete --srcdir=$sourceDir --disable-threads --disable-nls \
|
||||
--disable-libssp --with-as=$(which m6809-unknown-as) \
|
||||
--with-ar=$(which m6809-unknown-ar) --with-ld=$(which m6809-unknown-ld)
|
||||
|
||||
make $jobArgs all-gcc
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd $objectsDir
|
||||
make install-gcc
|
||||
# Remove buggy (empty) dir left over by install
|
||||
rm -r $prefix/m6809-unknown
|
||||
}
|
||||
@@ -3,7 +3,7 @@ DESCRIPTION="This is a version of the GCC compiler for the Motorla 6809. It \
|
||||
uses the lwtools as a backend. Note that there is no C library provided."
|
||||
HOMEPAGE="http://lwtools.projects.l-w.ca"
|
||||
SOURCE_URI="ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-$portVersion/gcc-$portVersion.tar.bz2"
|
||||
CHECKSUM_SHA256="e8f5853d4eec2f5ebaf8a72ae4d53c436aacf98153b2499f8635b48c4718a093"
|
||||
#CHECKSUM_SHA256="e8f5853d4eec2f5ebaf8a72ae4d53c436aacf98153b2499f8635b48c4718a093"
|
||||
REVISION="1"
|
||||
COPYRIGHT="1988-2013 Free Software Foundation, Inc."
|
||||
LICENSE="
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
From 1cebc03b98d7992a743c1d0fe303fc8fb2b27e45 Mon Sep 17 00:00:00 2001
|
||||
From 0c5f25aaf0fedee6f09bc07507aec23eb6776bdd Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sun, 13 Mar 2016 18:38:01 +0100
|
||||
Subject: Import gcc6809 patch level3.
|
||||
Date: Sun, 15 Jan 2017 21:13:16 +0100
|
||||
Subject: applying patch gcc6809-4.6.4.patch
|
||||
|
||||
|
||||
diff --git a/README.LW b/README.LW
|
||||
@@ -86,10 +86,10 @@ index ba6d84d..ae8e733 100644
|
||||
noconfigdirs="$noconfigdirs target-libstdc++-v3 ${libgcj}"
|
||||
libgloss_dir=m68hc11
|
||||
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
|
||||
index 872956d..a9c0a9f 100644
|
||||
index e0b952f..c2f5318 100644
|
||||
--- a/gcc/Makefile.in
|
||||
+++ b/gcc/Makefile.in
|
||||
@@ -1987,14 +1987,14 @@ $(T)crtbeginT.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
|
||||
@@ -2003,14 +2003,14 @@ $(T)crtbeginT.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
|
||||
|
||||
# Compile the start modules crt0.o and mcrt0.o that are linked with
|
||||
# every program
|
||||
@@ -122,7 +122,7 @@ index 4ad6c3f..f3af562 100644
|
||||
&& (flags & ECF_MAY_BE_ALLOCA))
|
||||
|| (pending_stack_adjust > 0
|
||||
diff --git a/gcc/config.gcc b/gcc/config.gcc
|
||||
index 39d9a19..fa7fb16 100644
|
||||
index 6dc2427..da0f667 100644
|
||||
--- a/gcc/config.gcc
|
||||
+++ b/gcc/config.gcc
|
||||
@@ -375,6 +375,9 @@ m32r*-*-*)
|
||||
@@ -135,7 +135,7 @@ index 39d9a19..fa7fb16 100644
|
||||
m68k-*-*)
|
||||
extra_headers=math-68881.h
|
||||
;;
|
||||
@@ -1702,6 +1705,12 @@ m32rle-*-linux*)
|
||||
@@ -1706,6 +1709,12 @@ m32rle-*-linux*)
|
||||
thread_file='posix'
|
||||
fi
|
||||
;;
|
||||
@@ -5333,10 +5333,10 @@ index 0000000..386bcc9
|
||||
+
|
||||
diff --git a/gcc/config/m6809/m6809.md b/gcc/config/m6809/m6809.md
|
||||
new file mode 100644
|
||||
index 0000000..31027a3
|
||||
index 0000000..263aa0f
|
||||
--- /dev/null
|
||||
+++ b/gcc/config/m6809/m6809.md
|
||||
@@ -0,0 +1,2359 @@
|
||||
@@ -0,0 +1,2358 @@
|
||||
+;; GCC machine description for Motorola 6809
|
||||
+;; Copyright (C) 1989, 2005, 2006, 2007, 2008,
|
||||
+;; 2009 Free Software Foundation, Inc.
|
||||
@@ -6022,7 +6022,7 @@ index 0000000..31027a3
|
||||
+; Increment of a 16-bit MEM by 1 can be done without a register.
|
||||
+(define_insn "*addhi_mem_1"
|
||||
+ [(set (match_operand:HI 0 "memory_operand" "=m")
|
||||
+ (plus:HI (match_operand:HI 1 "memory_operand" "0") (const_int 1)))]
|
||||
+ (plus:HI (match_dup 0) (const_int 1)))]
|
||||
+ "GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF"
|
||||
+{
|
||||
+ rtx xoperands[2];
|
||||
@@ -6041,7 +6041,7 @@ index 0000000..31027a3
|
||||
+; Decrement of a 16-bit MEM by 1 can be done without a register.
|
||||
+(define_insn "*addhi_mem_minus1"
|
||||
+ [(set (match_operand:HI 0 "memory_operand" "=m")
|
||||
+ (plus:HI (match_operand:HI 1 "memory_operand" "0") (const_int -1)))]
|
||||
+ (plus:HI (match_dup 0) (const_int -1)))]
|
||||
+ "GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF"
|
||||
+{
|
||||
+ rtx xoperands[2];
|
||||
@@ -6222,17 +6222,16 @@ index 0000000..31027a3
|
||||
+
|
||||
+
|
||||
+(define_insn "subqi3"
|
||||
+ [(set (match_operand:QI 0 "register_operand" "=q, q, !q, !q, q")
|
||||
+ (minus:QI (match_operand:QI 1 "whole_register_operand" "0, 0, I, tmn, 0")
|
||||
+ (match_operand:QI 2 "whole_general_operand" "I, mi, 0, 0, t")))]
|
||||
+ [(set (match_operand:QI 0 "register_operand" "=q, q, !q, q")
|
||||
+ (minus:QI (match_operand:QI 1 "whole_register_operand" "0, 0, I, 0")
|
||||
+ (match_operand:QI 2 "whole_general_operand" "I, mi, 0, t")))]
|
||||
+ ""
|
||||
+ "@
|
||||
+ dec%0
|
||||
+ sub%0\t%2
|
||||
+ dec%0\;neg%0
|
||||
+ sub%0\t%1\;neg%0
|
||||
+ sub%0\t%2"
|
||||
+ [(set_attr "length" "1,3,2,4,3")])
|
||||
+ [(set_attr "length" "1,3,2,3")])
|
||||
+
|
||||
+
|
||||
+;;--------------------------------------------------------------------
|
||||
@@ -8107,7 +8106,7 @@ index ece68b4..d0ec9d6 100644
|
||||
TI_UINT64_TYPE,
|
||||
|
||||
diff --git a/gcc/version.c b/gcc/version.c
|
||||
index 9744449..ed450c4 100644
|
||||
index 9744449..1a1e7e0 100644
|
||||
--- a/gcc/version.c
|
||||
+++ b/gcc/version.c
|
||||
@@ -21,16 +21,16 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -8131,10 +8130,10 @@ index 9744449..ed450c4 100644
|
||||
Makefile. */
|
||||
|
||||
-const char version_string[] = BASEVER DATESTAMP DEVPHASE REVISION;
|
||||
+const char version_string[] = BASEVER DATESTAMP DEVPHASE REVISION " (gcc6809lw)";
|
||||
+const char version_string[] = BASEVER DATESTAMP DEVPHASE REVISION " (gcc6809lw pl6)";
|
||||
const char pkgversion_string[] = PKGVERSION;
|
||||
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
|
||||
index 7e2ab93..6508a95 100644
|
||||
index b57aeb6..940c286 100644
|
||||
--- a/libgcc/Makefile.in
|
||||
+++ b/libgcc/Makefile.in
|
||||
@@ -374,8 +374,8 @@ endif
|
||||
@@ -8210,25 +8209,37 @@ index 3c7c2f3..eb3aa3a 100644
|
||||
2.7.0
|
||||
|
||||
|
||||
From 06853dccbf90f2c60ccdc4a6a3012e77bbed1e71 Mon Sep 17 00:00:00 2001
|
||||
From 696169dbc7af549e249c5122554a1ced664bb980 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sun, 13 Mar 2016 19:04:27 +0100
|
||||
Subject: Remove hardcoded -lm.
|
||||
Date: Sun, 15 Jan 2017 21:34:56 +0100
|
||||
Subject: Fix build with gcc5.
|
||||
|
||||
From
|
||||
https://github.com/DragonFlyBSD/DPorts/commit/a680cc6ef758e2f15be8bf8209da51658e02d710
|
||||
|
||||
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
|
||||
index a9c0a9f..da74a9b 100644
|
||||
--- a/gcc/Makefile.in
|
||||
+++ b/gcc/Makefile.in
|
||||
@@ -3929,7 +3929,7 @@ $(genprogerr:%=build/gen%$(build_exeext)): $(BUILD_ERRORS)
|
||||
genprog = $(genprogerr) check checksum condmd
|
||||
diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
|
||||
index 62cdfab..6bbc8c9 100644
|
||||
--- a/gcc/cp/cfns.h
|
||||
+++ b/gcc/cp/cfns.h
|
||||
@@ -53,6 +53,9 @@ __inline
|
||||
static unsigned int hash (const char *, unsigned int);
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
+#ifdef __GNUC_STDC_INLINE__
|
||||
+__attribute__ ((__gnu_inline__))
|
||||
+#endif
|
||||
#endif
|
||||
const char * libc_name_p (const char *, unsigned int);
|
||||
/* maximum key range = 391, duplicates = 0 */
|
||||
@@ -96,7 +99,7 @@ hash (register const char *str, register unsigned int len)
|
||||
400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
|
||||
400, 400, 400, 400, 400, 400, 400
|
||||
};
|
||||
- register int hval = len;
|
||||
+ register int hval = (int) len;
|
||||
|
||||
# These programs need libs over and above what they get from the above list.
|
||||
-build/genautomata$(build_exeext) : BUILD_LIBS += -lm
|
||||
+#build/genautomata$(build_exeext) : BUILD_LIBS += -lm
|
||||
|
||||
# These programs are not linked with the MD reader.
|
||||
build/gengtype$(build_exeext) : build/gengtype-lex.o build/gengtype-parse.o \
|
||||
switch (hval)
|
||||
{
|
||||
--
|
||||
2.7.0
|
||||
|
||||
Reference in New Issue
Block a user