summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorAlejandro Pulver <alepulver@FreeBSD.org>2006-10-20 20:00:37 +0000
committerAlejandro Pulver <alepulver@FreeBSD.org>2006-10-20 20:00:37 +0000
commitb84623a39334255e4c014d45e99c3a011cb5b5f0 (patch)
treee70035c0693e1ab491b8e0c1530a9b2a4c8aaee6 /lang
parent- Fix checksum since distfile was rerolled (distinfo) (diff)
- Fix building on FreeBSD 7.x.
- Fix plist on ia64/sparc64 (additional file installed). Reported by: pointyhat Approved by: portmgr (erwin)
Notes
Notes: svn path=/head/; revision=175440
Diffstat (limited to 'lang')
-rw-r--r--lang/gpc/Makefile6
-rw-r--r--lang/gpc/files/patch-gcc__config.gcc294
-rw-r--r--lang/gpc/files/patch-gcc__config__freebsd-spec.h64
-rw-r--r--lang/gpc/pkg-plist1
4 files changed, 360 insertions, 5 deletions
diff --git a/lang/gpc/Makefile b/lang/gpc/Makefile
index f0e4b08eab20..d785b240248e 100644
--- a/lang/gpc/Makefile
+++ b/lang/gpc/Makefile
@@ -50,8 +50,10 @@ GCC_VER?= 3.4.3
CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL}
.endif
-.if ${OSVERSION} >= 700019
-BROKEN= does not compile on FreeBSD >= 7.0
+.if ${ARCH} == "ia64" || ${ARCH} == "sparc64"
+PLIST_SUB+= CFM=""
+.else
+PLIST_SUB+= CFM="@comment "
.endif
post-extract:
diff --git a/lang/gpc/files/patch-gcc__config.gcc b/lang/gpc/files/patch-gcc__config.gcc
index 05afb9eb9621..3404a40b6b68 100644
--- a/lang/gpc/files/patch-gcc__config.gcc
+++ b/lang/gpc/files/patch-gcc__config.gcc
@@ -1,11 +1,299 @@
---- gcc/config.gcc.orig Wed Sep 8 12:16:10 2004
-+++ gcc/config.gcc Fri Jul 28 17:21:44 2006
-@@ -400,6 +400,8 @@
+--- ./gcc/config.gcc.orig Fri Oct 20 15:51:53 2006
++++ ./gcc/config.gcc Fri Oct 20 15:52:15 2006
+@@ -244,6 +244,7 @@
+ # machines.
+ tm_p_file=
+ cpu_type=`echo ${target} | sed 's/-.*$//'`
++cpu_is_64bit=
+ case ${target} in
+ alpha*-*-*)
+ cpu_type=alpha
+@@ -300,6 +301,11 @@
+ cpu_type=rs6000
+ extra_headers="ppc-asm.h altivec.h spe.h"
+ need_64bit_hwint=yes
++ case x$with_cpu in
++ xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345]|xrs64a)
++ cpu_is_64bit=yes
++ ;;
++ esac
+ ;;
+ rs6000*-*-*)
+ need_64bit_hwint=yes
+@@ -400,6 +406,12 @@
tm_defines="${tm_defines} FBSD_MAJOR=5" ;;
*-*-freebsd6 | *-*-freebsd[6].*)
tm_defines="${tm_defines} FBSD_MAJOR=6" ;;
+ *-*-freebsd7 | *-*-freebsd[7].*)
+ tm_defines="${tm_defines} FBSD_MAJOR=7" ;;
++ *-*-freebsd8 | *-*-freebsd[8].*)
++ tm_defines="${tm_defines} FBSD_MAJOR=8" ;;
++ *-*-freebsd9 | *-*-freebsd[9].*)
++ tm_defines="${tm_defines} FBSD_MAJOR=9" ;;
*)
echo 'Please update *-*-freebsd* in gcc/config.gcc'
exit 1
+@@ -680,7 +692,7 @@
+ ;;
+ arm*-*-rtems*)
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h"
+- tmake_file="arm/t-arm-elf t-rtems"
++ tmake_file="arm/t-arm-elf t-rtems arm/t-rtems"
+ ;;
+ arm*-*-elf | ep9312-*-elf)
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
+@@ -700,12 +712,16 @@
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h kaos.h arm/kaos-arm.h"
+ tmake_file=arm/t-arm-elf
+ ;;
++avr-*-rtems*)
++ tm_file="avr/avr.h dbxelf.h avr/rtems.h rtems.h"
++ tmake_file="avr/t-avr t-rtems avr/t-rtems"
++ ;;
+ avr-*-*)
+ tm_file="avr/avr.h dbxelf.h"
+ use_fixproto=yes
+ ;;
+ c4x-*-rtems* | tic4x-*-rtems*)
+- tmake_file="c4x/t-c4x t-rtems"
++ tmake_file="c4x/t-c4x t-rtems c4x/t-rtems"
+ tm_file="c4x/c4x.h c4x/rtems.h rtems.h"
+ c_target_objs="c4x-c.o"
+ cxx_target_objs="c4x-c.o"
+@@ -1678,20 +1694,16 @@
+ pdp11-*-*)
+ use_fixproto=yes
+ ;;
+-avr-*-*)
+- use_fixproto=yes
+- ;;
+ # port not yet contributed
+ #powerpc-*-openbsd*)
+ # tmake_file="${tmake_file} rs6000/t-fprules "
+ # extra_headers=
+ # ;;
+ powerpc64-*-linux*)
+- tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
+- case x$with_cpu in
+- x|xpowerpc64|xdefault64) tm_file="${tm_file} rs6000/default64.h";;
+- esac
+- tm_file="${tm_file} rs6000/linux64.h"
++ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
++ test x$with_cpu != x || cpu_is_64bit=yes
++ test x$cpu_is_64bit != xyes || tm_file="${tm_file} rs6000/default64.h"
++ tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h"
+ tmake_file="rs6000/t-fprules t-slibgcc-elf-ver t-linux rs6000/t-ppccomm rs6000/t-linux64"
+ ;;
+ powerpc64-*-gnu*)
+@@ -1765,8 +1777,20 @@
+ tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
+ ;;
+ powerpc-*-linux*)
+- tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
++ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
+ tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
++ case ${enable_targets}:${cpu_is_64bit} in
++ *powerpc64* | all:* | *:yes)
++ if test x$cpu_is_64bit = xyes; then
++ tm_file="${tm_file} rs6000/default64.h"
++ fi
++ tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h"
++ tmake_file="$tmake_file rs6000/t-linux64"
++ ;;
++ *)
++ tm_file="${tm_file} rs6000/linux.h"
++ ;;
++ esac
+ ;;
+ powerpc-*-gnu-gnualtivec*)
+ tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h rs6000/gnu.h"
+@@ -2007,7 +2031,7 @@
+ with_cpu=ultrasparc
+ ;;
+ sparc-*-elf*)
+- tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h"
++ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/elf.h"
+ tmake_file="sparc/t-elf sparc/t-crtfm"
+ extra_parts="crti.o crtn.o crtbegin.o crtend.o"
+ use_fixproto=yes
+@@ -2017,7 +2041,7 @@
+ tmake_file="t-slibgcc-elf-ver t-linux sparc/t-crtfm"
+ ;;
+ sparc-*-rtems*)
+- tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h"
++ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/elf.h sparc/rtemself.h rtems.h"
+ tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
+ extra_parts="crti.o crtn.o crtbegin.o crtend.o"
+ ;;
+@@ -2106,13 +2130,13 @@
+ tmake_file=sparc/t-sparclite
+ ;;
+ sparclite-*-elf*)
+- tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/liteelf.h"
++ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/elf.h sparc/liteelf.h"
+ tmake_file="sparc/t-sparclite sparc/t-crtfm"
+ extra_parts="crtbegin.o crtend.o"
+ use_fixproto=yes
+ ;;
+ sparc86x-*-elf*)
+- tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/sp86x-elf.h"
++ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/elf.h sparc/sp86x-elf.h"
+ tmake_file="sparc/t-sp86x sparc/t-crtfm"
+ extra_parts="crtbegin.o crtend.o"
+ use_fixproto=yes
+@@ -2122,7 +2146,7 @@
+ use_fixproto=yes
+ ;;
+ sparc64-*-elf*)
+- tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sp64-elf.h"
++ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-gld.h sparc/sp64-elf.h"
+ tmake_file="${tmake_file} sparc/t-crtfm"
+ extra_parts="crtbegin.o crtend.o"
+ use_fixproto=yes
+@@ -2398,24 +2422,24 @@
+ esac
+ fi
+
+- # Similarly for --with-schedule.
+- if test x$with_schedule = x; then
+- case ${target} in
+- hppa1* | parisc1*)
+- # Override default PA8000 scheduling model.
+- with_schedule=7100LC
+- ;;
+- esac
+- fi
++# Similarly for --with-schedule.
++if test x$with_schedule = x; then
++ case ${target} in
++ hppa1* | parisc1*)
++ # Override default PA8000 scheduling model.
++ with_schedule=7100LC
++ ;;
++ esac
++fi
+
+- # Validate and mark as valid any --with options supported
+- # by this target. In order to use a particular --with option
+- # you must list it in supported_defaults; validating the value
+- # is optional. This case statement should set nothing besides
+- # supported_defaults.
++# Validate and mark as valid any --with options supported
++# by this target. In order to use a particular --with option
++# you must list it in supported_defaults; validating the value
++# is optional. This case statement should set nothing besides
++# supported_defaults.
+
+- supported_defaults=
+- case "${target}" in
++supported_defaults=
++case "${target}" in
+ alpha*-*-*)
+ supported_defaults="cpu tune"
+ for which in cpu tune; do
+@@ -2569,8 +2593,7 @@
+ eval $with_which=
+ ;;
+ "" | common \
+- | power | power2 | power3 | power4 \
+- | powerpc | powerpc64 \
++ | power | power[2345] | powerpc | powerpc64 \
+ | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
+ | 401 | 403 | 405 | 405fp | 440 | 440fp | 505 \
+ | 601 | 602 | 603 | 603e | ec603e | 604 \
+@@ -2655,11 +2678,11 @@
+ ;;
+ esac
+ ;;
+- esac
++esac
+
+- # Set some miscellaneous flags for particular targets.
+- target_cpu_default2=
+- case ${target} in
++# Set some miscellaneous flags for particular targets.
++target_cpu_default2=
++case ${target} in
+ alpha*-*-*)
+ if test x$gas = xyes
+ then
+@@ -2771,44 +2794,45 @@
+ ;;
+ esac
+ ;;
+- esac
++esac
+
+- t=
+- all_defaults="abi cpu arch tune schedule float mode"
+- for option in $all_defaults
+- do
+- eval "val=\$with_$option"
+- if test -n "$val"; then
+- case " $supported_defaults " in
+- *" $option "*)
+- ;;
+- *)
+- echo "This target does not support --with-$option." 2>&1
+- exit 1
+- ;;
+- esac
++t=
++all_defaults="abi cpu arch tune schedule float mode"
++for option in $all_defaults
++do
++ eval "val=\$with_$option"
++ if test -n "$val"; then
++ case " $supported_defaults " in
++ *" $option "*)
++ ;;
++ *)
++ echo "This target does not support --with-$option." 2>&1
++ exit 1
++ ;;
++ esac
+
+- if test "x$t" = x
+- then
+- t="{ \"$option\", \"$val\" }"
+- else
+- t="${t}, { \"$option\", \"$val\" }"
+- fi
++ if test "x$t" = x
++ then
++ t="{ \"$option\", \"$val\" }"
++ else
++ t="${t}, { \"$option\", \"$val\" }"
+ fi
+- done
+- if test "x$t" = x
+- then
+- configure_default_options="{ { NULL, NULL} }"
+- else
+- configure_default_options="{ ${t} }"
+ fi
++done
+
+- if test "$target_cpu_default2" != ""
++if test "x$t" = x
++then
++ configure_default_options="{ { NULL, NULL} }"
++else
++ configure_default_options="{ ${t} }"
++fi
++
++if test "$target_cpu_default2" != ""
++then
++ if test "$target_cpu_default" != ""
+ then
+- if test "$target_cpu_default" != ""
+- then
+- target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
+- else
+- target_cpu_default=$target_cpu_default2
+- fi
++ target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
++ else
++ target_cpu_default=$target_cpu_default2
+ fi
++fi
diff --git a/lang/gpc/files/patch-gcc__config__freebsd-spec.h b/lang/gpc/files/patch-gcc__config__freebsd-spec.h
new file mode 100644
index 000000000000..9d76aad68eb3
--- /dev/null
+++ b/lang/gpc/files/patch-gcc__config__freebsd-spec.h
@@ -0,0 +1,64 @@
+--- ./gcc/config/freebsd-spec.h.orig Fri Oct 20 15:51:07 2006
++++ ./gcc/config/freebsd-spec.h Fri Oct 20 15:51:23 2006
+@@ -51,7 +51,13 @@
+ #define FBSD_TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+- if (FBSD_MAJOR == 6) \
++ if (FBSD_MAJOR == 9) \
++ builtin_define ("__FreeBSD__=9"); \
++ else if (FBSD_MAJOR == 8) \
++ builtin_define ("__FreeBSD__=8"); \
++ if (FBSD_MAJOR == 7) \
++ builtin_define ("__FreeBSD__=7"); \
++ else if (FBSD_MAJOR == 6) \
+ builtin_define ("__FreeBSD__=6"); \
+ else if (FBSD_MAJOR == 5) \
+ builtin_define ("__FreeBSD__=5"); \
+@@ -107,12 +113,12 @@
+ 500016, select the appropriate libc, depending on whether we're
+ doing profiling or need threads support. At __FreeBSD_version
+ 500016 and later, when threads support is requested include both
+- -lc and -lc_r instead of only -lc_r. To make matters interesting,
+- we can't actually use __FreeBSD_version provided by <osreldate.h>
+- directly since it breaks cross-compiling. As a final twist, make
+- it a hard error if -pthread is provided on the command line and gcc
+- was configured with --disable-threads (this will help avoid bug
+- reports from users complaining about threading when they
++ -lc and the threading lib instead of only -lc_r. To make matters
++ interesting, we can't actually use __FreeBSD_version provided by
++ <osreldate.h> directly since it breaks cross-compiling. As a final
++ twist, make it a hard error if -pthread is provided on the command
++ line and gcc was configured with --disable-threads (this will help
++ avoid bug reports from users complaining about threading when they
+ misconfigured the gcc bootstrap but are later consulting FreeBSD
+ manual pages that refer to the mythical -pthread option). */
+
+@@ -129,13 +135,7 @@
+ %{pg: -lc_p} \
+ }"
+ #else
+-#if FBSD_MAJOR >= 5
+-#define FBSD_LIB_SPEC " \
+- %{!shared: \
+- %{!pg: %{pthread:-lc_r} -lc} \
+- %{pg: %{pthread:-lc_r_p} -lc_p} \
+- }"
+-#else
++#if FBSD_MAJOR < 5
+ #define FBSD_LIB_SPEC " \
+ %{!shared: \
+ %{!pg: \
+@@ -144,6 +144,12 @@
+ %{pg: \
+ %{!pthread:-lc_p} \
+ %{pthread:-lc_r_p}} \
++ }"
++#else
++#define FBSD_LIB_SPEC " \
++ %{!shared: \
++ %{!pg: %{pthread:-lpthread} -lc} \
++ %{pg: %{pthread:-lpthread_p} -lc_p} \
+ }"
+ #endif
+ #endif
diff --git a/lang/gpc/pkg-plist b/lang/gpc/pkg-plist
index 553a268d7954..a51d0744aacf 100644
--- a/lang/gpc/pkg-plist
+++ b/lang/gpc/pkg-plist
@@ -7,6 +7,7 @@ lib/gpc/gcc/%%GNU_HOST%%/%%GCC_VER%%/crtbegin.o
lib/gpc/gcc/%%GNU_HOST%%/%%GCC_VER%%/crtbeginS.o
lib/gpc/gcc/%%GNU_HOST%%/%%GCC_VER%%/crtend.o
lib/gpc/gcc/%%GNU_HOST%%/%%GCC_VER%%/crtendS.o
+%%CFM%%lib/gpc/gcc/%%GNU_HOST%%/%%GCC_VER%%/crtfastmath.o
lib/gpc/gcc/%%GNU_HOST%%/%%GCC_VER%%/include/gpc-in-c.h
lib/gpc/gcc/%%GNU_HOST%%/%%GCC_VER%%/libgcc.a
lib/gpc/gcc/%%GNU_HOST%%/%%GCC_VER%%/libgcc_eh.a