]> sourceware.org Git - glibc.git/blobdiff - Makeconfig
Update.
[glibc.git] / Makeconfig
index d7c7172db6d5a05a2f20a9934ffb8e001652b03e..60d351946f8ebb2968cfb6115d59eadbf7847d6a 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2000,01,02 Free Software Foundation, Inc.
+# Copyright (C) 1991-2000,01,02, 03 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -139,12 +139,6 @@ endif
 ####
 
 
-# Set this to either `stdio' or `libio', to compile in either GNU stdio
-# or GNU libio.
-ifndef stdio
-stdio = stdio
-endif
-
 # Common prefix for machine-independent installation directories.
 ifeq ($(origin prefix),undefined) # ifndef would override explicit empty value.
 prefix = /usr/local
@@ -188,7 +182,7 @@ endif
 
 # Where to install the header files.
 ifndef includedir
-includedir = $(exec_prefix)/include
+includedir = $(prefix)/include
 endif
 inst_includedir = $(install_root)$(includedir)
 
@@ -443,7 +437,7 @@ link-libc = -Wl,-rpath-link=$(rpath-link) \
 # This is how to find at build-time things that will be installed there.
 rpath-dirs = math elf dlfcn nss nis rt resolv crypt
 else
-ifneq (,$(findstring aix,$(config-os)))
+ifneq (,$(filter aix aix%,$(config-os)))
 link-libc = $(common-objpfx)libc.a \
            $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
 rpath-dirs = math dlfcn nss nis rt resolv crypt
@@ -466,7 +460,7 @@ LDFLAGS-soname-fname = -Wl,-soname,$(@F)
 LDFLAGS-rdynamic = -rdynamic
 LDFLAGS-Bsymbolic = -Bsymbolic
 else
-ifneq (,$(findstring aix,$(config-os)))
+ifneq (,$(filter aix aix%,$(config-os)))
 LDFLAGS-rpath-ORIGIN =
 LDFLAGS-soname-fname =
 LDFLAGS-rdynamic = -Wl,-bdynamic
@@ -532,7 +526,8 @@ sysdep-library-path = \
 $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
                                       $(filter -Wl$(comma)-rpath-link=%,\
                                                $(sysdep-LDFLAGS)))))
-run-program-prefix = $(if $(findstring $(notdir $(built-program-file)), $(tests-static)),, \
+run-program-prefix = $(if $(filter $(notdir $(built-program-file)),\
+                                  $(tests-static)),, \
                          $(elf-objpfx)$(rtld-installed-name) \
                          --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)))
 else
@@ -558,10 +553,11 @@ else
 +gccwarn := -Wall -Wwrite-strings -Winline -Wstrict-prototypes
 endif
 
-# This is the program that generates makefile
-# dependencies from C source files.
+# This is the program that generates makefile dependencies from C source files.
+# The -MP flag tells GCC >= 3.2 (which we now require) to produce dummy
+# targets for headers so that removed headers don't break the build.
 ifndef +mkdep
-+mkdep = $(CC) -M
++mkdep = $(CC) -M -MP
 endif
 
 # The program that makes Emacs-style TAGS files.
@@ -624,18 +620,25 @@ endif     # $(+cflags) == ""
 # `+sysdep-includes' will be defined by Makerules.
 +includes = -I$(..)include -I. \
            $(patsubst %/,-I%,$(objpfx)) $(patsubst %/,-I%,$(..)) \
-           $($(stdio)-include) $(includes) \
-           $(+sysdep-includes) $(last-includes) $(sysincludes)
+           $(libio-include) $(includes) \
+           $(+sysdep-includes) $(sysincludes)
 
 # Since libio has several internal header files, we use a -I instead
 # of many little headers in the include directory.
 libio-include = -I$(..)libio
 
 # These are the variables that the implicit compilation rules use.
+# Note that we can't use -std=* in CPPFLAGS, because it overrides
+# the implicit -lang-asm and breaks cpp behavior for .S files--notably
+# it causes cpp to stop predefining __ASSEMBLER__.
 CPPFLAGS = $($(subdir)-CPPFLAGS) $(+includes) $(defines) \
           -include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \
-          $(CPPFLAGS-$(suffix $@)) $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F))
-override CFLAGS        = $(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
+          $(CPPFLAGS-$(suffix $@)) \
+          $(foreach lib,$(libof-$(basename $(@F))) \
+                        $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
+          $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
+override CFLAGS        = -std=gnu99 \
+                 $(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
                  $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
 
 # If everything is compiled with -fPIC (implicitly) we must tell this by
@@ -709,10 +712,16 @@ object-suffixes-for-libc += .oS
 # shared objects.  We don't want to use CFLAGS-os because users may, for
 # example, make that processor-specific.
 CFLAGS-.oS = $(CFLAGS-.o) $(pic-ccflag)
-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC
+CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
 libtype.oS = lib%_nonshared.a
 endif
 
+# The assembler can generate debug information too.
+ifndef ASFLAGS
+ifeq ($(have-cpp-asm-debuginfo),yes)
+ASFLAGS := $(filter -g%,$(CFLAGS))
+endif
+endif
 
 +gnu-stabs = $(shell echo>&2 '*** BARF ON ME')
 
@@ -741,8 +750,7 @@ ifeq (yes, $(build-shared))
 # (but no commands).
 %.v.i: $(common-objpfx)config.h
        sed '/^[        ]*#/d;s/^[      ]*%/#/' $(filter-out FORCE %.h,$^) \
-       | $(CC) -E -undef -I$(common-objdir) -I$(..)include \
-                  -include $(common-objpfx)config.h \
+       | $(CC) -E -undef $(CPPFLAGS) \
                   -DASSEMBLER -x assembler-with-cpp - \
                   > $@T
        mv -f $@T $@
@@ -761,6 +769,7 @@ $(common-objpfx)shlib-versions.v.i: \
                                                     $(add-ons) \
                                                     $(subdirs)))
 $(common-objpfx)soversions.i: $(common-objpfx)shlib-versions.v
+       default_setname='$(filter-out %_default,$(oldest-abi:%=GLIBC_%))'; \
        while read conf version setname; do \
          test -n "$$version" && \
          test `expr '$(config-machine)-$(config-vendor)-$(config-os)' \
@@ -768,6 +777,7 @@ $(common-objpfx)soversions.i: $(common-objpfx)shlib-versions.v
          if test "x$$version" = xDEFAULT; then \
            default_setname="$$setname"; \
          else \
+           $(abi-default_setname) \
            lib=`echo $$version | sed 's/=.*$$//'`; \
            if eval test -z "\$${versioned_$${lib}}"; then \
              eval versioned_$${lib}=yes; \
@@ -885,7 +895,7 @@ endif
 # dependencies.  Only the $(binfmt-subdir) should always be kept at the
 # end of the list.
 all-subdirs = csu assert ctype locale intl catgets math setjmp signal      \
-             stdlib stdio-common $(stdio) malloc string wcsmbs time dirent \
+             stdlib stdio-common libio malloc string wcsmbs time dirent \
              grp pwd posix io termios resource misc socket sysvipc gmon    \
              gnulib iconv iconvdata wctype manual shadow po argp           \
              crypt $(add-ons) nss localedata timezone rt conform debug     \
@@ -942,3 +952,7 @@ endif
 
 
 endif # Makeconfig not yet included
+
+# Local Variables:
+# mode: makefile
+# End:
This page took 0.034085 seconds and 5 git commands to generate.