summaryrefslogtreecommitdiff
path: root/Rules.mak
diff options
context:
space:
mode:
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak24
1 files changed, 16 insertions, 8 deletions
diff --git a/Rules.mak b/Rules.mak
index 321f356a3..c165c1c6f 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -108,15 +108,19 @@ MINOR_VERSION := 9
SUBLEVEL := 32
EXTRAVERSION :=-git
VERSION := $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL)
+# no abi compat between sublevel releases yet, so we use full version
+# for soname
+ABI_VERSION := $(VERSION)
ifneq ($(EXTRAVERSION),)
VERSION := $(VERSION)$(EXTRAVERSION)
endif
# Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc.
LC_ALL := C
-export MAJOR_VERSION MINOR_VERSION SUBLEVEL VERSION LC_ALL
+export MAJOR_VERSION MINOR_VERSION SUBLEVEL VERSION ABI_VERSION LC_ALL
LIBC := libc
-SHARED_MAJORNAME := $(LIBC).so.$(MAJOR_VERSION)
+SHARED_LIBNAME := $(LIBC).so.$(ABI_VERSION)
+
ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),)
UCLIBC_LDSO_NAME := ld64-uClibc
ARCH_NATIVE_BIT := 64
@@ -124,17 +128,19 @@ else
UCLIBC_LDSO_NAME := ld-uClibc
ARCH_NATIVE_BIT := 32
endif
-UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(MAJOR_VERSION)
+UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION)
NONSHARED_LIBNAME := uclibc_nonshared.a
-libc := $(top_builddir)lib/$(SHARED_MAJORNAME)
-libc.depend := $(top_builddir)lib/$(SHARED_MAJORNAME:.$(MAJOR_VERSION)=)
+libc := $(top_builddir)lib/$(SHARED_LIBNAME)
+libc.depend := $(top_builddir)lib/$(SHARED_LIBNAME:.$(ABI_VERSION)=)
+libdl.depend := $(top_builddir)lib/libdl.so
+libpthread.depend := $(top_builddir)lib/libpthread.so
interp := $(top_builddir)lib/interp.os
ldso := $(top_builddir)lib/$(UCLIBC_LDSO)
headers_dep := $(top_builddir)include/bits/sysnum.h
sub_headers := $(headers_dep)
#LIBS :=$(interp) -L$(top_builddir)lib -lc
-LIBS := $(interp) -L$(top_builddir)lib $(libc:.$(MAJOR_VERSION)=)
+LIBS := $(interp) -L$(top_builddir)lib $(libc:.$(ABI_VERSION)=)
# Make sure DESTDIR and PREFIX can be used to install
# PREFIX is a uClibcism while DESTDIR is a common GNUism
@@ -527,6 +533,7 @@ XWARNINGS=$(call qstrip,$(WARNINGS)) -Wstrict-prototypes -fno-strict-aliasing
ifeq ($(EXTRA_WARNINGS),y)
XWARNINGS+=-Wnested-externs -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wformat=2
XWARNINGS+=-Wmissing-prototypes -Wmissing-declarations
+XWARNINGS+=-Wold-style-declaration -Wold-style-definition
XWARNINGS+=-Wnonnull -Wundef
# Works only w/ gcc-3.4 and up, can't be checked for gcc-3.x w/ check_gcc()
#XWARNINGS+=-Wdeclaration-after-statement
@@ -589,7 +596,7 @@ endif
LDFLAGS:=$(LDFLAGS_NOSTRIP) -Wl,-z,defs
ifeq ($(DODEBUG),y)
-CFLAGS += -O0 -g3
+CFLAGS += -O0 -g3 -DDEBUG
else
CFLAGS += $(OPTIMIZATION)
endif
@@ -632,12 +639,12 @@ PTDIR := libpthread/$(PTNAME)
# set up system dependencies include dirs (NOTE: order matters!)
ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
PTINC:= -I$(top_srcdir)$(PTDIR) \
+ -I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/$(TARGET_SUBARCH) \
-I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH) \
-I$(top_srcdir)$(PTDIR)/sysdeps/$(TARGET_ARCH) \
-I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux \
-I$(top_srcdir)$(PTDIR)/sysdeps/pthread \
-I$(top_srcdir)$(PTDIR)/sysdeps/pthread/bits \
- -I$(top_srcdir)$(PTDIR)/sysdeps/generic \
-I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
-I$(top_srcdir)ldso/include
#
@@ -671,6 +678,7 @@ else
PTNAME :=
PTINC :=
endif
+CFLAGS += -I$(top_srcdir)libc/sysdeps/linux/common
CFLAGS += -I$(KERNEL_HEADERS)
#CFLAGS += -iwithprefix include-fixed -iwithprefix include