From 92ad15a8f1d3e65f20fda3265c04ff26a642a2d0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 15 Mar 2010 11:44:58 -0700 Subject: Implement handling of libc ABI in ELF header. --- Makerules | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'Makerules') diff --git a/Makerules b/Makerules index 43fa5a701b..d5ff383770 100644 --- a/Makerules +++ b/Makerules @@ -1,4 +1,4 @@ -# Copyright (C) 1991-2006,2007,2008,2009 Free Software Foundation, Inc. +# Copyright (C) 1991-2006,2007,2008,2009,2010 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 @@ -109,6 +109,18 @@ $(common-objpfx)%.latest: $(common-objpfx)abi-versions.h endif # avoid-generated endif # $(versioning) = yes +ifndef avoid-generated +before-compile := $(common-objpfx)libc-abis.h $(before-compile) +libc-abis := $(firstword $(wildcard $(foreach D,$(add-ons), $(..)libc-abis)) \ + libc-abis) +$(common-objpfx)libc-abis.h: $(..)scripts/gen-libc-abis $(libc-abis) + $(SHELL) $(..)scripts/gen-libc-abis \ + $(base-machine)-$(config-vendor)-$(config-os) \ + < $(libc-abis) > $@T + $(move-if-change) $@T $@ +common-generated += $(common-objpfx)libc-abis.h +endif # avoid-generated + # Make sure the subdirectory for object files gets created. ifdef objpfx ifeq (,$(wildcard $(objpfx).)) @@ -1395,7 +1407,7 @@ $(objpfx)stubs: $(objs-for-stubs) ifneq (,$(strip $(objs-for-stubs))) (cd $(objpfx).; $(OBJDUMP) -h $(patsubst $(objpfx)%,%,$^)) | \ $(AWK) '/\.gnu\.glibc-stub\./ { \ - sub(/\.gnu\.glibc-stub\./, "", $$2); \ + sub(/\.gnu\.glibc-stub\./, "", $$2); \ stubs[$$2] = 1; } \ END { for (s in stubs) print "#define __stub_" s }' > $@T mv -f $@T $@ -- cgit 1.4.1