mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
Some fixes for latest gcc 3.4 snapshot.
committer: mfx <mfx> 1059510876 +0000
This commit is contained in:
parent
2163231401
commit
69d9aa6c69
|
@ -1,5 +1,5 @@
|
||||||
ifeq ($(DEPS_DONE),)
|
ifeq ($(DEPS_DONE),)
|
||||||
DEPS_DONE = 1
|
DEPS_DONE := 1
|
||||||
|
|
||||||
|
|
||||||
# /***********************************************************************
|
# /***********************************************************************
|
||||||
|
@ -44,5 +44,5 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
endif
|
endif # DEPS_DONE
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,7 @@ LINK_EXE_OUTPUT = -e$@
|
||||||
ifeq ($(WITH_ZLIB),1)
|
ifeq ($(WITH_ZLIB),1)
|
||||||
LDLIBS += -lz
|
LDLIBS += -lz
|
||||||
endif
|
endif
|
||||||
# warning: do _not_ use option `-d' --> incorrect string merging will happen
|
# warning: do not use option `-d' --> incorrect string merging will happen
|
||||||
ifeq ($(DEBUG),1)
|
ifeq ($(DEBUG),1)
|
||||||
CFLAGS += -Od -dc
|
CFLAGS += -Od -dc
|
||||||
else
|
else
|
||||||
|
@ -279,7 +279,7 @@ endif # djgpp2
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### win32 - cygwin / mingw32
|
### win32 - cygwin / mingw32 / rsxnt
|
||||||
###
|
###
|
||||||
|
|
||||||
ifeq ($(target),cygwin)
|
ifeq ($(target),cygwin)
|
||||||
|
@ -331,7 +331,10 @@ o = .obj
|
||||||
a = .lib
|
a = .lib
|
||||||
e = .exe
|
e = .exe
|
||||||
CC = bcc32 -3
|
CC = bcc32 -3
|
||||||
INCLUDES += -I$(srcdir)/acc -I$(srcdir)/filter
|
INCLUDES += -I$(srcdir)/acc
|
||||||
|
ifneq ($(strip $(wildcard $(srcdir)/filter)),)
|
||||||
|
INCLUDES += -I$(srcdir)/filter
|
||||||
|
endif
|
||||||
CFLAGS = -w -w-inl -g1
|
CFLAGS = -w -w-inl -g1
|
||||||
CFLAGS_OUTPUT = -o$@
|
CFLAGS_OUTPUT = -o$@
|
||||||
LDFLAGS = -ls
|
LDFLAGS = -ls
|
||||||
|
@ -416,7 +419,7 @@ ifeq ($(DEBUG),1)
|
||||||
CFLAGS += -Od -ZI
|
CFLAGS += -Od -ZI
|
||||||
LINK_EXE_LDFLAGS += /debug
|
LINK_EXE_LDFLAGS += /debug
|
||||||
else
|
else
|
||||||
CFLAGS += -O1 -GF
|
CFLAGS += -O1 -GF -Gy
|
||||||
LINK_EXE_LDFLAGS += /release
|
LINK_EXE_LDFLAGS += /release
|
||||||
endif
|
endif
|
||||||
RESOURCES := $(subst .rc,.res,$(notdir $(wildcard $(srcdir)/*.rc)))
|
RESOURCES := $(subst .rc,.res,$(notdir $(wildcard $(srcdir)/*.rc)))
|
||||||
|
@ -475,7 +478,7 @@ LIB := $(DOS_LIBDIRS);$(LIB)
|
||||||
endif
|
endif
|
||||||
export LIB
|
export LIB
|
||||||
|
|
||||||
ifeq (1,2)
|
ifeq (1,1)
|
||||||
# statically link libc.lib
|
# statically link libc.lib
|
||||||
CC += -ML
|
CC += -ML
|
||||||
LDLIBS = $(DOS_LDLIBS:.lib=_ml.lib) setargv.obj
|
LDLIBS = $(DOS_LDLIBS:.lib=_ml.lib) setargv.obj
|
||||||
|
@ -488,7 +491,7 @@ ifeq ($(DEBUG),1)
|
||||||
CFLAGS += -Od -ZI
|
CFLAGS += -Od -ZI
|
||||||
LINK_EXE_LDFLAGS += /debug
|
LINK_EXE_LDFLAGS += /debug
|
||||||
else
|
else
|
||||||
CFLAGS += -O1 -GF
|
CFLAGS += -O1 -GF -Gy
|
||||||
LINK_EXE_LDFLAGS += /release
|
LINK_EXE_LDFLAGS += /release
|
||||||
##LINK_EXE_LDFLAGS += /opt:nowin98
|
##LINK_EXE_LDFLAGS += /opt:nowin98
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -373,8 +373,8 @@ int __acc_cdecl_qsort le32_compare_signed(const void *e1, const void *e2);
|
||||||
|
|
||||||
// just for testing...
|
// just for testing...
|
||||||
#if (1 && ACC_ARCH_IA32 && ACC_CC_GNUC >= 0x030200)
|
#if (1 && ACC_ARCH_IA32 && ACC_CC_GNUC >= 0x030200)
|
||||||
typedef unsigned short LE16_unaligned __attribute__((__packed__,__aligned__(1)));
|
typedef unsigned short LE16_unaligned __attribute__((__aligned__(1)));
|
||||||
typedef unsigned int LE32_unaligned __attribute__((__packed__,__aligned__(1)));
|
typedef unsigned int LE32_unaligned __attribute__((__aligned__(1)));
|
||||||
# define LE16 LE16_unaligned
|
# define LE16 LE16_unaligned
|
||||||
# define LE32 LE32_unaligned
|
# define LE32 LE32_unaligned
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -26,28 +26,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#if 0 && defined(_MSC_VER) && (_MSC_VER >= 1300)
|
|
||||||
# define _Nomemory UNUSED_Nomemory
|
|
||||||
# include <xstddef>
|
|
||||||
# undef _Nomemory
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//#define WANT_STL
|
//#define WANT_STL
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
#include "stdcxx.h"
|
#include "stdcxx.h"
|
||||||
|
|
||||||
|
|
||||||
#if 0 && defined(_MSC_VER) && (_MSC_VER >= 1300)
|
|
||||||
#undef _Nomemory
|
|
||||||
namespace std {
|
|
||||||
void __cdecl _Nomemory() {
|
|
||||||
static const bad_alloc ba;
|
|
||||||
throw ba;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if 1 && defined(__linux__) && (ACC_CC_GNUC >= 0x030400)
|
#if 1 && defined(__linux__) && (ACC_CC_GNUC >= 0x030400)
|
||||||
/* this is used by __gnu_cxx::__verbose_terminate_handler() */
|
/* this is used by __gnu_cxx::__verbose_terminate_handler() */
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
|
@ -52,13 +52,13 @@
|
||||||
# define DISABLE_NEW_DELETE_PLACEMENT_NEW \
|
# define DISABLE_NEW_DELETE_PLACEMENT_NEW \
|
||||||
static void *operator new(size_t, void *);
|
static void *operator new(size_t, void *);
|
||||||
# endif
|
# endif
|
||||||
# if defined(__GNUC__) && (__GNUC__ >= 3)
|
# if (ACC_CC_GNUC >= 0x030000ul)
|
||||||
# define DISABLE_NEW_DELETE_PLACEMENT_DELETE \
|
# define DISABLE_NEW_DELETE_PLACEMENT_DELETE \
|
||||||
static void operator delete(void *, void *) NOTHROW { }
|
static void operator delete(void *, void *) NOTHROW { }
|
||||||
# elif defined(__INTEL_COMPILER)
|
# elif (ACC_CC_INTELC)
|
||||||
# define DISABLE_NEW_DELETE_PLACEMENT_DELETE \
|
# define DISABLE_NEW_DELETE_PLACEMENT_DELETE \
|
||||||
static void operator delete(void *, void *) NOTHROW { }
|
static void operator delete(void *, void *) NOTHROW { }
|
||||||
# elif defined(_MSC_VER) && (_MSC_VER >= 1200)
|
# elif (ACC_CC_MSC && (_MSC_VER >= 1200))
|
||||||
# define DISABLE_NEW_DELETE_PLACEMENT_DELETE \
|
# define DISABLE_NEW_DELETE_PLACEMENT_DELETE \
|
||||||
static void operator delete(void *, void *) NOTHROW { }
|
static void operator delete(void *, void *) NOTHROW { }
|
||||||
# endif
|
# endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user