Add support for native linux-arm builds.

This commit is contained in:
Andrew Johnson
2012-07-30 17:50:30 -05:00
parent 1649ce6f79
commit 1864ac41fb
8 changed files with 48 additions and 15 deletions

View File

@ -17,7 +17,7 @@ ifeq ($(BUILD_CLASS),CROSS)
# prefix of compiler tools
CMPLR_SUFFIX =
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))
CMPLR_PREFIX = $(GNU_TARGET)-
# Provide a link-time path for shared libraries
SHRLIBDIR_RPATH_LDFLAGS_YES += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath-link,%)

View File

@ -0,0 +1,10 @@
# CONFIG.linux-arm.Common
#
# $Revision-Id$
#
# Definitions for linux-arm host builds
# Sites may override these definitions in CONFIG_SITE.linux-arm.Common
#-------------------------------------------------------
#Include definitions common to unix hosts
include $(CONFIG)/os/CONFIG.UnixCommon.Common

View File

@ -0,0 +1,10 @@
# CONFIG.linux-arm.linux-arm
#
# $Revision-Id$
#
# Definitions for native linux-arm builds
# Sites may override these definitions in CONFIG_SITE.linux-arm.linux-arm
#-------------------------------------------------------
# Include common gnu compiler definitions
include $(CONFIG)/CONFIG.gnuCommon

View File

@ -0,0 +1,7 @@
# CONFIG_SITE.linux-arm.linux-arm
#
# $Revision-Id$
#
# Site specific definitions for native linux-arm builds
#-------------------------------------------------------

View File

@ -5,8 +5,10 @@
# Site specific definitions for linux-x86 host - linux-arm target builds
#-------------------------------------------------------
# Diamond:
# Tools install path
#GNU_DIR = /home/targetOS/linux-arm/host/x86-linux/gcc_3.3.3
# anj@aps:
#GNU_DIR = /local/anj/cross-arm/gcc-3.4.5-glibc-2.3.6/arm-linux
GNU_DIR = /net/phoebus/vw/zynq-2011.09
# GNU crosscompiler target name
GNU_TARGET = arm-xilinx-linux-gnueabi

0
src/tools/mkmf.pl Executable file → Normal file
View File

View File

@ -24,21 +24,24 @@ case $sysname in
Linux )
os=linux
cpu=`uname -m`
case $cpu in i386 | i486 | i586 | i686 )
cpu=x86
;;
case $cpu in
i386 | i486 | i586 | i686 )
cpu=x86 ;;
x86_64 )
;; # $cpu is correct
armv6l | armv7l )
cpu=arm ;;
esac
if [ ${cpu} = "x86_64" ]; then
cpu=x86_64
fi
echo ${os}-${cpu}${suffix}
;;
Darwin )
os=darwin
cpu=`uname -m`
case $cpu in
"Power Macintosh") cpu=ppc ;;
i386 | x86_64 ) cpu=x86 ;;
"Power Macintosh")
cpu=ppc ;;
i386 | x86_64 )
cpu=x86 ;;
esac
echo ${os}-${cpu}${suffix}
;;

View File

@ -24,10 +24,11 @@ print "$EpicsHostArch$suffix";
sub GetEpicsHostArch { # no args
$arch=$Config{'archname'};
if ($arch =~ /sun4-solaris/) { return "solaris-sparc";
if ($arch =~ /sun4-solaris/) { return "solaris-sparc";
} elsif ($arch =~ m/i86pc-solaris/) { return "solaris-x86";
} elsif ($arch =~ m/i[3-6]86-linux/) { return "linux-x86";
} elsif ($arch =~ m/x86_64-linux/) { return "linux-x86_64";
} elsif ($arch =~ m/i[3-6]86-linux/){ return "linux-x86";
} elsif ($arch =~ m/x86_64-linux/) { return "linux-x86_64";
} elsif ($arch =~ m/arm-linux/) { return "linux-arm";
} elsif ($arch =~ m/MSWin32-x86/) { return "win32-x86";
} elsif ($arch =~ m/cygwin/) { return "cygwin-x86";
} elsif ($arch =~ m/darwin/) {