From e6a3149428ef2d42d9a9df78a19c2e52496f3deb Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 22 May 2009 09:42:20 +0100 Subject: gcc: Add 4.3.3 and switch to for Moblin Signed-off-by: Richard Purdie --- .../packages/gcc/gcc-4.3.3/debian/ada-alpha.dpatch | 88 ++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 meta/packages/gcc/gcc-4.3.3/debian/ada-alpha.dpatch (limited to 'meta/packages/gcc/gcc-4.3.3/debian/ada-alpha.dpatch') diff --git a/meta/packages/gcc/gcc-4.3.3/debian/ada-alpha.dpatch b/meta/packages/gcc/gcc-4.3.3/debian/ada-alpha.dpatch new file mode 100644 index 000000000..1e2c47d67 --- /dev/null +++ b/meta/packages/gcc/gcc-4.3.3/debian/ada-alpha.dpatch @@ -0,0 +1,88 @@ +#! /bin/sh -e + +# DP: Fix GNAT on alpha. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +2008-04-01 Aurelien Jarno + + * s-osinte-linux-alpha.ads (SC_NPROCESSORS_ONLN): New constant + for sysconf call. + (bit_field): New packed boolean type used by cpu_set_t. + (cpu_set_t): New type corresponding to the C type with + the same name. Note that on the Ada side we use a bit + field array for the affinity mask. There is not need + for the C macro for setting individual bit. + (pthread_setaffinity_np): New imported routine. + +Index: gcc/ada/s-osinte-linux-alpha.ads +=================================================================== +--- gcc/ada/s-osinte-linux-alpha.ads (révision 133772) ++++ gcc/ada/s-osinte-linux-alpha.ads (copie de travail) +@@ -237,6 +237,7 @@ + pragma Import (C, sysconf); + + SC_CLK_TCK : constant := 2; ++ SC_NPROCESSORS_ONLN : constant := 84; + + ------------------------- + -- Priority Scheduling -- +@@ -268,6 +269,7 @@ + + type Thread_Body is access + function (arg : System.Address) return System.Address; ++ pragma Convention (C, Thread_Body); + + function Thread_Body_Access is new + Unchecked_Conversion (System.Address, Thread_Body); +@@ -448,12 +450,31 @@ + pragma Import (C, pthread_getspecific, "pthread_getspecific"); + + type destructor_pointer is access procedure (arg : System.Address); ++ pragma Convention (C, destructor_pointer); + + function pthread_key_create + (key : access pthread_key_t; + destructor : destructor_pointer) return int; + pragma Import (C, pthread_key_create, "pthread_key_create"); + ++ CPU_SETSIZE : constant := 1_024; ++ ++ type bit_field is array (1 .. CPU_SETSIZE) of Boolean; ++ for bit_field'Size use CPU_SETSIZE; ++ pragma Pack (bit_field); ++ pragma Convention (C, bit_field); ++ ++ type cpu_set_t is record ++ bits : bit_field; ++ end record; ++ pragma Convention (C, cpu_set_t); ++ ++ function pthread_setaffinity_np ++ (thread : pthread_t; ++ cpusetsize : size_t; ++ cpuset : access cpu_set_t) return int; ++ pragma Import (C, pthread_setaffinity_np, "__gnat_pthread_setaffinity_np"); ++ + private + + type sigset_t is record -- cgit v1.2.3