EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Build rules for x86_64 hosts
From: "Denison, PN \(Peter\)" <[email protected]>
To: <[email protected]>
Date: Mon, 12 Nov 2007 17:15:54 -0000
I think that the linux-x86* targets should have either -m32 or -m64
defined in their compiler flags, to prevent mishaps if they're compiled
on various combinations of 32-bit / 64-bit architectures/kernels under
linux.

The horrible kludge in the Common.linux-x86 file is to allow the
"native" compiler to be used to compile for 32-bit on the 64-bit
platform. Better ways of doing it would be appreciated!

Any comments? (I've run the test suites on the output, and all seems to
be OK, though I will do more)

Index: configure/os/CONFIG.Common.linux-x86_64
===================================================================
--- configure/os/CONFIG.Common.linux-x86_64     (revision 13390)
+++ configure/os/CONFIG.Common.linux-x86_64     (working copy)
@@ -12,6 +12,7 @@

 ARCH_CLASS = x86_64

+ARCH_DEP_CFLAGS += -m64
 ARCH_DEP_CPPFLAGS += -D_X86_64_

 ifeq ($(BUILD_CLASS),CROSS)
Index: configure/os/CONFIG.Common.linux-x86
===================================================================
--- configure/os/CONFIG.Common.linux-x86        (revision 13390)
+++ configure/os/CONFIG.Common.linux-x86        (working copy)
@@ -12,6 +12,7 @@

 ARCH_CLASS = x86

+ARCH_DEP_CFLAGS += -m32
 ARCH_DEP_CPPFLAGS += -D_X86_

 ifeq ($(BUILD_CLASS),CROSS)
@@ -27,9 +28,22 @@
 -include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
 -include $(CONFIG)/os/CONFIG_SITE.linux-x86.linux-x86
 else
-   GNU_TARGET=i586-pc-linux-gnu
-   CMPLR_SUFFIX=
-   CMPLR_PREFIX=$(addsuffix -,$(GNU_TARGET))
+   ifeq ($(EPICS_HOST_ARCH),linux-x86_64)
+      # Added for 64-bit cross builds
+      CMPLR_PREFIX=
+      CROSS_INCLUDES=
+      CROSS_LDFLAGS=
+      # Use -w not -Wall
+      #WARN_CFLAGS_YES = -w
+      #WARN_CXXFLAGS_YES = -w
+      -include $(CONFIG)/os/CONFIG_SITE.Common.linux-x86
+      -include $(CONFIG)/os/CONFIG.linux-x86_64.linux-x86
+      -include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.linux-x86
+   else
+      GNU_TARGET=i586-pc-linux-gnu
+      CMPLR_SUFFIX=
+      CMPLR_PREFIX=$(addsuffix -,$(GNU_TARGET))
+   endif
 endif
 endif
Index: configure/os/CONFIG.linux-x86_64.linux-x86
===================================================================
--- configure/os/CONFIG.linux-x86_64.linux-x86  (revision 13390)
+++ configure/os/CONFIG.linux-x86_64.linux-x86  (working copy)
@@ -1,9 +1,9 @@
-#  CONFIG.linux-x86_64.linux-x86_64
+#  CONFIG.linux-x86_64.linux-x86
 #
-# CONFIG.linux-x86_64.linux-x86_64,v 1.1.2.1 2005/10/28 15:31:31 jba
Exp
+# CONFIG.linux-x86_64.linux-x86,v 1.1.2.1 2005/10/28 15:31:31 jba Exp
 #
-# Definitions for linux-x86_64 host - linux-x86_64 target builds
-# Sites may override these definitions in
CONFIG_SITE.linux-x86_64.linux-x86_64+# Definitions for linux-x86_64
host - linux-x86 target builds
+# Sites may override these definitions in
CONFIG_SITE.linux-x86_64.linux-x86
 #-------------------------------------------------------

 # Include common gnu compiler definitions
@@ -11,6 +11,8 @@

 GNU_DIR = /usr

+ARCH_DEP_LDFLAGS += -m32 -Wl,-melf_i386
+
 STATIC_LDFLAGS_YES= -Wl,-Bstatic
 STATIC_LDFLAGS_NO=
 STATIC_LDLIBS_YES= -Wl,-Bdynamic

-- 
Peter Denison, Senior Software Engineer, Diamond Light Source Ltd.
Tel: +44 1235 778511
(apologies in advance for the lines below. Some bits are a legal
requirement and I have no control over them)

<DIV><FONT size="1" color="gray">This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
</FONT></DIV> 


Navigate by Date:
Prev: RE: epicsTime.cpp Strangeness Denison, PN (Peter)
Next: Redundancy Patches Andrew Johnson
Index: 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: epicsTime.cpp Strangeness Denison, PN (Peter)
Next: Redundancy Patches Andrew Johnson
Index: 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·