public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
* try to sort out building synth on 64-bit machines
@ 2009-08-23 11:45 Bart Veer
  0 siblings, 0 replies; only message in thread
From: Bart Veer @ 2009-08-23 11:45 UTC (permalink / raw)
  To: ecos-patches

When building the synth target-side on a 64-bit box, this patch should
cause the build to default to gcc -m32. Provided the appropriate
32-bit development RPMs or equivalent are installed, the target-side
should then build happily.

Bart

2009-07-14  Bart Veer  <bartv@ecoscentric.com>

	* cdl/hal_synth_i386.cdl: when building on x86_64 machines, use
	gcc -m32 instead of i686-pc-linux-gnu.

Index: i386linux/current/cdl/hal_synth_i386.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/synth/i386linux/current/cdl/hal_synth_i386.cdl,v
retrieving revision 1.8
diff -u -p -r1.8 hal_synth_i386.cdl
--- i386linux/current/cdl/hal_synth_i386.cdl	11 Aug 2009 16:00:29 -0000	1.8
+++ i386linux/current/cdl/hal_synth_i386.cdl	23 Aug 2009 11:42:06 -0000
@@ -104,11 +104,13 @@ cdl_package CYGPKG_HAL_SYNTH_I386 {
             display "Global command prefix"
             flavor  data
             no_define
-	    if { ($tcl_platform(os) == "Linux") && [string match "i*86" $tcl_platform(machine)] } {
-		default_value { "" }
-	    } else {
-		default_value { "i686-pc-linux-gnu" }
-	    }
+            if { ($tcl_platform(os) == "Linux") && [string match "i*86" $tcl_platform(machine)] } {
+                default_value { "" }
+            } elseif { ($tcl_platform(os) == "Linux") && [string equal "x86_64" $tcl_platform(machine)] } {
+                default_value { "" }
+            } else {
+                default_value { "i686-pc-linux-gnu" }
+            }
             description "
                 This option specifies the command prefix used when
                 invoking the build tools. You must be using gcc-2.95.2 or
@@ -120,7 +122,11 @@ cdl_package CYGPKG_HAL_SYNTH_I386 {
             display "Global compiler flags"
             flavor  data
             no_define
-            default_value { CYGBLD_GLOBAL_WARNFLAGS . " -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " }
+            if { ($tcl_platform(os) == "Linux") && [string equal "x86_64" $tcl_platform(machine)] } {
+                default_value { CYGBLD_GLOBAL_WARNFLAGS . " -m32 -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " }
+            } else {
+                default_value { CYGBLD_GLOBAL_WARNFLAGS . " -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " }
+            }
             description   "
                 This option controls the global compiler flags which
                 are used to compile all packages by
@@ -132,7 +138,11 @@ cdl_package CYGPKG_HAL_SYNTH_I386 {
             display "Global linker flags"
             flavor  data
             no_define
-            default_value { "-g -nostdlib -Wl,--gc-sections -Wl,-static" }
+            if { ($tcl_platform(os) == "Linux") && [string equal "x86_64" $tcl_platform(machine)] } {
+                default_value { "-m32 -g -nostdlib -Wl,--gc-sections -Wl,-static" }
+            } else {
+                default_value { "-g -nostdlib -Wl,--gc-sections -Wl,-static" }
+            }
             description   "
                 This option controls the global linker flags. Individual
                 packages may define options which override these global flags."

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-23 11:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-23 11:45 try to sort out building synth on 64-bit machines Bart Veer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).