mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Fix ebacktrace1 under MinGW's GCC 4.8 and binutils 2.23.2.
We keep needing more and more hacks as libbfd keeps becoming dependent on additional libraries we don't need... git-svn-id: https://svn.eduke32.com/eduke32@4076 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
535394abde
commit
b40f0aba04
3 changed files with 41 additions and 2 deletions
|
@ -424,7 +424,7 @@ endif
|
|||
|
||||
$(EBACKTRACEDLL): platform/Windows/src/backtrace.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(CC) $(OURCONLYFLAGS) -O2 -shared -Wall -Wextra -I$(EINC) -o $@ $^ -lbfd -liberty -limagehlp; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
if $(CC) $(OURCONLYFLAGS) -O2 -shared -Wall -Wextra -static-libgcc -I$(EINC) -o $@ $^ -lbfd -liberty -limagehlp; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/%.nasm
|
||||
$(COMPILE_STATUS)
|
||||
|
|
|
@ -434,6 +434,7 @@ endif
|
|||
ifeq ($(PLATFORM),WINDOWS)
|
||||
BASELIBDIRS+= -L$(abspath $(MAKEFILE_COMMON_DIR)/platform/Windows/lib$(WINLIB))
|
||||
BASECOMMONFLAGS+= -I$(abspath $(MAKEFILE_COMMON_DIR)/platform/Windows/include)
|
||||
BASELDFLAGS+= -static-libgcc
|
||||
endif
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
# include port and brew
|
||||
|
|
|
@ -419,7 +419,7 @@ backtrace_unregister(void)
|
|||
}
|
||||
|
||||
BOOL WINAPI
|
||||
DllMain(HANDLE hinstDLL ATTRIBUTE((unused)), DWORD dwReason, LPVOID lpvReserved ATTRIBUTE((unused)))
|
||||
DllMain(HINSTANCE hinstDLL ATTRIBUTE((unused)), DWORD dwReason, LPVOID lpvReserved ATTRIBUTE((unused)))
|
||||
{
|
||||
switch (dwReason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
|
@ -440,6 +440,7 @@ char *libintl_dgettext (const char *domain_name ATTRIBUTE((unused)), const char
|
|||
return buf;
|
||||
}
|
||||
|
||||
int __printf__ ( const char * format, ... );
|
||||
int libintl_fprintf ( FILE * stream, const char * format, ... );
|
||||
int libintl_sprintf ( char * str, const char * format, ... );
|
||||
int libintl_snprintf ( char *buffer, int buf_size, const char *format, ... );
|
||||
|
@ -447,6 +448,16 @@ int libintl_vprintf ( const char * format, va_list arg );
|
|||
int libintl_vfprintf ( FILE * stream, const char * format, va_list arg );
|
||||
int libintl_vsprintf ( char * str, const char * format, va_list arg );
|
||||
|
||||
int __printf__ ( const char * format, ... )
|
||||
{
|
||||
int value;
|
||||
va_list arg;
|
||||
va_start(arg, format);
|
||||
value = vprintf ( format, arg );
|
||||
va_end(arg);
|
||||
return value;
|
||||
}
|
||||
|
||||
int libintl_fprintf ( FILE * stream, const char * format, ... )
|
||||
{
|
||||
int value;
|
||||
|
@ -486,3 +497,30 @@ int libintl_vsprintf ( char * str, const char * format, va_list arg )
|
|||
{
|
||||
return vsprintf ( str, format, arg );
|
||||
}
|
||||
|
||||
/* cut dependence on zlib... libbfd needs this */
|
||||
|
||||
int compress (unsigned char *dest ATTRIBUTE((unused)), unsigned long destLen ATTRIBUTE((unused)), const unsigned char source ATTRIBUTE((unused)), unsigned long sourceLen ATTRIBUTE((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
unsigned long compressBound (unsigned long sourceLen)
|
||||
{
|
||||
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + (sourceLen >> 25) + 13;
|
||||
}
|
||||
int inflateEnd(void *strm ATTRIBUTE((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int inflateInit_(void *strm ATTRIBUTE((unused)), const char *version ATTRIBUTE((unused)), int stream_size ATTRIBUTE((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int inflateReset(void *strm ATTRIBUTE((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int inflate(void *strm ATTRIBUTE((unused)), int flush ATTRIBUTE((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue