svn commit: trunk/uClibc/libc/sysdeps/linux/common

aldot at uclibc.org aldot at uclibc.org
Fri May 30 20:00:20 UTC 2008


Author: aldot
Date: 2008-05-30 13:00:19 -0700 (Fri, 30 May 2008)
New Revision: 22126

Log:
- Fix gcc glitch with mremap and IMA.
  For -combine, make sure that we don't pollute our non-varargs mremap decl
  with some vararg decl from later in the TU by putting ours after anybody
  else who is picking up mman.h.
  This is admittedly a small work-around..

smallish testcase:

$ cat bug.h
extern void *mremap (void*, unsigned, unsigned, int, ...);
$ cat bug1.c
#include "bug.h"
int whatever;
$ cat bug2.c
#define mremap _hidemremap
#include "bug.h"
#undef mremap
void *mremap (void*, unsigned, unsigned, int, void*);
$ gcc -c bug1.c bug2.c
$ gcc -c bug1.c bug2.c -combine
bug2.c:4: error: conflicting types for ?\226?\128?\152mremap?\226?\128?\153
bug.h:1: error: previous declaration of ?\226?\128?\152mremap?\226?\128?\153 was here



Modified:
   trunk/uClibc/libc/sysdeps/linux/common/Makefile.in


Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/common/Makefile.in
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/Makefile.in	2008-05-30 17:58:47 UTC (rev 22125)
+++ trunk/uClibc/libc/sysdeps/linux/common/Makefile.in	2008-05-30 20:00:19 UTC (rev 22126)
@@ -37,6 +37,13 @@
 CFLAGS-ssp.c := $(SSP_DISABLE_FLAGS)
 CFLAGS-ssp-local.c := $(SSP_DISABLE_FLAGS)
 
+ifneq ($(findstring mremap.c,$(CSRC)),)
+# for -combine, make sure that we don't pollute our non-varargs mremap decl
+# with some vararg decl from later in the TU by putting ours after anybody
+# else who is picking up mman.h.
+# This is admittedly a small work-around..
+CSRC := $(filter-out mremap.c,$(CSRC)) mremap.c
+endif
 COMMON_SRC := $(patsubst %.c,$(COMMON_DIR)/%.c,$(CSRC))
 COMMON_OBJ := $(patsubst %.c,$(COMMON_OUT)/%.o,$(CSRC))
 




More information about the uClibc-cvs mailing list