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 <[email protected]> * 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."
