o moved -march=i586 from CONFIG.arch.arch to CONFIG.Common.arch {cygwin-x86,win32-x86-cygwin,win32-x86-mingw

o removed -march=i586 from CONFIG.linux-x86.linux-x86
o fixed compile errors in epicsAtomicOSD.h (I didnt have the proper version of solaris for initial testing here)
This commit is contained in:
Jeff Hill
2011-08-08 17:33:19 -06:00
parent 921df1dd5c
commit eefc3b34e0
7 changed files with 36 additions and 24 deletions

View File

@@ -23,6 +23,9 @@ POSIX_LDLIBS += -lpthread
ARCH_DEP_CFLAGS += -m32
ARCH_DEP_LDFLAGS += -m32
# default minimum target architecture is pentium
ARCH_DEP_CFLAGS += -march=i586
# Compiler defines _X86_ 1
# Compiler defines __MSVCRT__ 1
# Compiler defines __CYGWIN__ 1

View File

@@ -23,6 +23,9 @@ POSIX_LDLIBS += -lpthread
ARCH_DEP_CFLAGS += -m32
ARCH_DEP_LDFLAGS += -m32
# default minimum target architecture is pentium
ARCH_DEP_CFLAGS += -march=i586
# With no-cygwin option:
# compiler defines _X86_ 1
# compiler defines __MSVCRT__ 1

View File

@@ -19,6 +19,9 @@ LDLIBS_READLINE = -lreadline -lcurses
ARCH_DEP_CFLAGS += -m32
ARCH_DEP_LDFLAGS += -m32
# default minimum target architecture is pentium
ARCH_DEP_CFLAGS += -march=i586
# Compiler defines _X86_ 1
# Compiler defines __MSVCRT__ 1
# Compiler defines __MINGW32__ 1

View File

@@ -16,8 +16,3 @@ STATIC_LDLIBS_NO=
SHRLIB_LDFLAGS += -Wl,-h$@
LOADABLE_SHRLIB_LDFLAGS += -Wl,-h$@
# this means that atomic instrnsics are available, but that
# users with 486 processors and earlier will need specialized
# configure files
ARCH_DEP_CFLAGS += -march=i586

View File

@@ -23,11 +23,6 @@ SHRLIB_CFLAGS =
SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)
LOADABLE_SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)
# this means that atomic instrnsics are available, but that
# users with 486 processors and earlier will need specialized
# configure files
ARCH_DEP_CFLAGS += -march=i586
# Override linking with gcc library from CONFIG.gnuCommon
GNU_LDLIBS_YES =

View File

@@ -18,11 +18,6 @@ RANLIB = ranlib
RES=.coff
RCCMD = windres $(INCLUDES) $< $@
# this means that atomic instrnsics are available, but that
# users with 486 processors and earlier will need specialized
# configure files
ARCH_DEP_CFLAGS += -march=i586
# No -fPIC avoids "-fPIC ignored for target (all code is position independent)"
SHRLIB_CFLAGS =
SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)

View File

@@ -48,46 +48,64 @@ OSD_ATOMIC_INLINE void epicsAtomicSetUIntT ( unsigned * pTarget, unsigned newVal
OSD_ATOMIC_INLINE size_t epicsAtomicIncrSizeT ( size_t * pTarget )
{
return atomic_inc_uint_nv ( pTarget );
unsigned * const pTarg = ( unsigned * ) ( pTarget );
return atomic_inc_uint_nv ( pTarg );
}
OSD_ATOMIC_INLINE size_t epicsAtomicDecrSizeT ( size_t * pTarget )
{
return atomic_dec_uint_nv ( pTarget );
unsigned * const pTarg = ( unsigned * ) ( pTarget );
return atomic_dec_uint_nv ( pTarg );
}
OSD_ATOMIC_INLINE void epicsAtomicSetSizeT ( size_t * pTarget, size_t newVal )
{
atomic_swap_uint ( pTarget, newVal );
unsigned * const pTarg = ( unsigned * ) ( pTarget );
atomic_swap_uint ( pTarg, newVal );
}
OSD_ATOMIC_INLINE size_t epicsAtomicGetSizeT ( const size_t * pTarget )
{
return atomic_or_uint_nv ( pTarget, 0U );
/*
* we cast away const, but are careful not to modify
* the target
*/
unsigned * const pTarg = ( unsigned * ) ( pTarget );
return atomic_or_uint_nv ( pTarg, 0U );
}
#else /* SIZE_MAX == UINT_MAX */
#elif SIZE_MAX == ULONG_MAX
OSD_ATOMIC_INLINE size_t epicsAtomicIncrSizeT ( size_t * pTarget )
{
return atomic_inc_ulong_nv ( pTarget );
unsigned long * const pTarg = ( unsigned long * ) ( pTarget );
return atomic_inc_ulong_nv ( pTarg );
}
OSD_ATOMIC_INLINE size_t epicsAtomicDecrSizeT ( size_t * pTarget )
{
return atomic_dec_ulong_nv ( pTarget );
unsigned long * const pTarg = ( unsigned long * ) ( pTarget );
return atomic_dec_ulong_nv ( pTarg );
}
OSD_ATOMIC_INLINE void epicsAtomicSetSizeT ( size_t * pTarget, size_t newVal )
{
atomic_swap_ulong ( pTarget, newval );
unsigned long * const pTarg = ( unsigned long * ) ( pTarget );
atomic_swap_ulong ( pTarg, newval );
}
OSD_ATOMIC_INLINE size_t epicsAtomicGetSizeT ( const size_t * pTarget )
{
return atomic_or_ulong_nv ( pTarget, 0U );
/*
* we cast away const, but are careful not to modify
* the target
*/
unsigned long * const pTarg = ( unsigned long * ) ( pTarget );
return atomic_or_ulong_nv ( pTarg, 0UL );
}
#else
# error unsupported solaris architecture
#endif /* SIZE_MAX == UINT_MAX */
#ifdef __cplusplus