diff --git a/configure/os/CONFIG.Common.linuxCommon b/configure/os/CONFIG.Common.linuxCommon index a230d1734..98ee158e9 100644 --- a/configure/os/CONFIG.Common.linuxCommon +++ b/configure/os/CONFIG.Common.linuxCommon @@ -12,17 +12,14 @@ include $(CONFIG)/os/CONFIG.Common.UnixCommon OS_CLASS = Linux -CODE_CPPFLAGS = -D_REENTRANT - -POSIX_CPPFLAGS = -D_POSIX_C_SOURCE=200112L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 +# Define _GNU_SOURCE and _DEFAULT_SOURCE for maximum portability +POSIX_CPPFLAGS = -D_GNU_SOURCE -D_DEFAULT_SOURCE POSIX_LDLIBS = -lpthread -# -D_BSD_SOURCE for gethostname() in unistd.h as needed by cacChannelIO.cpp. -OP_SYS_CPPFLAGS += -D_BSD_SOURCE OP_SYS_CPPFLAGS += -Dlinux OP_SYS_LDLIBS += -lrt -ldl -# Added here for cross-target builds which include this file +# Linker flags for static & shared-library builds STATIC_LDFLAGS_YES= -Wl,-Bstatic STATIC_LDFLAGS_NO= STATIC_LDLIBS_YES= -Wl,-Bdynamic diff --git a/src/ca/client/CAref.html b/src/ca/client/CAref.html index 98dbdd5e5..c198ed56a 100644 --- a/src/ca/client/CAref.html +++ b/src/ca/client/CAref.html @@ -959,53 +959,55 @@ base>/lib/<architechture>".
If you do not use the EPICS build environemnt (layered make files) then it +
If you do not use the EPICS build environment (layered make files) then it may be helpful to run one of the EPICS make files and watch the compile/link lines. This may be the simplest way to capture the latest system and compiler -specific options required by your build environment. I have included some -snapshots of typical build lines below, but expect some risk of this -information becoming dated.
+specific options required by your build environment. Some snapshots of typical +build lines are shown below, but this information may be out of date./usr/bin/gcc -c -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS
--D_XOPEN_SOURCE=500 -DOSITHREAD_USE_DEFAULT_STACK -D_X86_ -DUNIX -D_BSD_SOURCE
--Dlinux -D_REENTRANT -ansi -O3 -Wall -I. -I.. -I../../../include/os/Linux
--I../../../include ../acctst.c
gcc -D_GNU_SOURCE -DOSITHREAD_USE_DEFAULT_STACK -D_X86_ -DUNIX -Dlinux
+-O3 -g -Wall -I. -I.. -I../../../../include/compiler/gcc
+-I../../../../include/os/Linux -I../../../../include -c ../acctst.c
/usr/bin/g++ -o acctst
--L/home/user/epicsR3.14/epics/base/lib/linux-x86/
--Wl,-rpath,/mnt/bogart_home/hill/epicsR3.14/epics/base/lib/linux-x86
+g++ -o acctst -L/home/user/epics/base-3.15/lib/linux-x86
+-Wl,-rpath,/home/user/epics/base-3.15/lib/linux-x86
acctstMain.o acctst.o -lca -lComTypical Solaris Build Options
/opt/SUNWspro/bin/cc -c -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500
-DOSITHREAD_USE_DEFAULT_STACK -DUNIX -DSOLARIS=9 -mt -D__EXTENSIONS__ -Xc -v
--xO4 -I. -I.. -I./../../../include/os/solaris -I./../../../include
-../acctst.c
/opt/SUNWspro/bin/CC -o acctst
--L/home/phoebus1/JHILL/epics/base/lib/solaris-sparc/ -mt -z ignore -z combreloc
--z lazyload -R/home/disk1/user/epics/base/lib/solaris-sparc acctstMain.o
+-L/home/user/epics/base-3.15/lib/solaris-sparc/ -mt -z ignore -z combreloc
+-z lazyload -R/home/user/epics/base-3.15/lib/solaris-sparc acctstMain.o
acctst.o -lca -lCom
cl -c /nologo /D__STDC__=0 /Ox /GL /W3 /w44355 /MD -I. -I..
--I..\\..\\..\\include\\os\\WIN32 -I..\\..\\..\\include ..\\acctst.c
link -nologo /LTCG /incremental:no /opt:ref /release /version:3.14
+link -nologo /LTCG /incremental:no /opt:ref /release /version:3.15
-out:acctst.exe acctstMain.obj acctst.obj
-d:/user/R3.14.clean/epics/base/lib/WIN32-x86/ca.lib
-d:/user/R3.14.clean/epics/base/lib/WIN32-x86/
/usr/local/xcomp/ppc/bin/ccppc -c -D_POSIX_SOURCE -DCPU=PPC603
--DvxWorks -include /home/vx/tornado20/target/h/vxWorks.h -ansi -O3 -Wall
--mcpu=603 -mstrict-align -fno-builtin -I. -I.. -I../../../include/os/vxWorks
--I../../../include -I/home/vx/tornado20/target/h ../acctst.c
/usr/local/vxWorks-6.9/gnu/4.3.3-vxworks-6.9/x86-linux2/bin/ccppc
+-DCPU=PPC32 -DvxWorks=vxWorks -O2 -Wall -mstrict-align -mlongcall -fno-builtin
+-include /usr/local/vxWorks-6.9/vxworks-6.9/target/h/vxWorks.h
+-I. -I../O.Common -I.. -I../../../../include/compiler/gcc
+-I../../../../include/os/vxWorks -I../../../../include
+-I/usr/local/vxWorks-6.9/vxworks-6.9/target/h
+-I/usr/local/vxWorks-6.9/vxworks-6.9/target/h/wrn/coreip
+-c ../acctst.c