|
|
ce426f |
Again we have to fix librtkaio to use MODULE_NAME definitions to
|
|
|
ce426f |
work around the changes we are making and preserve ABI/API.
|
|
|
ce426f |
|
|
|
ce426f |
commit 279bc5b3c384c09746fbadb2b68c6db9e833c064
|
|
|
ce426f |
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
|
|
|
ce426f |
Date: Thu Nov 20 11:42:00 2014 +0530
|
|
|
ce426f |
|
|
|
ce426f |
Use MODULE_NAME in stap-probe instead of IN_LIB
|
|
|
ce426f |
|
|
|
ce426f |
Define MODULE_NAME in the build command and define IN_MODULE using
|
|
|
ce426f |
MODULE_NAME. Verified that the generated code is unchanged on x86_64.
|
|
|
ce426f |
|
|
|
ce426f |
* Makeconfig (module-cppflags-real): Define MODULE_NAME
|
|
|
ce426f |
instead of IN_MODULE.
|
|
|
ce426f |
* include/libc-symbols.h (IN_MODULE): Define using
|
|
|
ce426f |
MODULE_NAME.
|
|
|
ce426f |
(PASTE_NAME, PASTE_NAME1): New macros.
|
|
|
ce426f |
* include/stap-probe.h (LIBC_PROBE_1): Use MODULE_NAME instead
|
|
|
ce426f |
of IN_LIB.
|
|
|
ce426f |
(STAP_PROBE_ASM): Likewise.
|
|
|
ce426f |
|
|
|
ce426f |
Index: glibc-2.17-c758a686/Makeconfig
|
|
|
ce426f |
===================================================================
|
|
|
ce426f |
--- glibc-2.17-c758a686.orig/Makeconfig
|
|
|
ce426f |
+++ glibc-2.17-c758a686/Makeconfig
|
|
|
ce426f |
@@ -741,7 +741,7 @@ in-module = $(subst -,_,$(firstword $(li
|
|
|
ce426f |
libc))
|
|
|
ce426f |
|
|
|
ce426f |
module-cppflags-real = -include $(common-objpfx)libc-modules.h \
|
|
|
ce426f |
- -DIN_MODULE=MODULE_$(in-module)
|
|
|
ce426f |
+ -DMODULE_NAME=$(in-module)
|
|
|
ce426f |
|
|
|
ce426f |
# We don't need libc-modules.h and the MODULE_NAME definition for .v.i
|
|
|
ce426f |
# files. These targets don't (and will likely never need to) use the IS_IN
|
|
|
ce426f |
@@ -940,7 +940,7 @@ postclean-generated += soversions.mk sov
|
|
|
ce426f |
before-compile += $(common-objpfx)libc-modules.h
|
|
|
ce426f |
ifeq ($(soversions.mk-done),t)
|
|
|
ce426f |
# Generate a header with macro definitions for use with the IS_IN macro.
|
|
|
ce426f |
-# These are the possible values for the IN_MODULE macro defined when building
|
|
|
ce426f |
+# These are the possible values for the MODULE_NAME macro defined when building
|
|
|
ce426f |
# sources, to identify which module the translation unit is going to be built
|
|
|
ce426f |
# into.
|
|
|
ce426f |
$(common-objpfx)libc-modules.h: $(common-objpfx)libc-modules.stmp; @:
|
|
|
ce426f |
Index: glibc-2.17-c758a686/include/libc-symbols.h
|
|
|
ce426f |
===================================================================
|
|
|
ce426f |
--- glibc-2.17-c758a686.orig/include/libc-symbols.h
|
|
|
ce426f |
+++ glibc-2.17-c758a686/include/libc-symbols.h
|
|
|
ce426f |
@@ -20,8 +20,12 @@
|
|
|
ce426f |
#ifndef _LIBC_SYMBOLS_H
|
|
|
ce426f |
#define _LIBC_SYMBOLS_H 1
|
|
|
ce426f |
|
|
|
ce426f |
+#define IN_MODULE PASTE_NAME (MODULE_, MODULE_NAME)
|
|
|
ce426f |
#define IS_IN(lib) (IN_MODULE == MODULE_##lib)
|
|
|
ce426f |
|
|
|
ce426f |
+#define PASTE_NAME(a,b) PASTE_NAME1 (a,b)
|
|
|
ce426f |
+#define PASTE_NAME1(a,b) a##b
|
|
|
ce426f |
+
|
|
|
ce426f |
/* This file's macros are included implicitly in the compilation of every
|
|
|
ce426f |
file in the C library by -imacros.
|
|
|
ce426f |
|
|
|
ce426f |
Index: glibc-2.17-c758a686/include/stap-probe.h
|
|
|
ce426f |
===================================================================
|
|
|
ce426f |
--- glibc-2.17-c758a686.orig/include/stap-probe.h
|
|
|
ce426f |
+++ glibc-2.17-c758a686/include/stap-probe.h
|
|
|
ce426f |
@@ -30,7 +30,7 @@
|
|
|
ce426f |
|
|
|
ce426f |
Systemtap's header defines the macros STAP_PROBE (provider, name) and
|
|
|
ce426f |
STAP_PROBEn (provider, name, arg1, ..., argn). For "provider" we paste
|
|
|
ce426f |
- in the IN_LIB name (libc, libpthread, etc.) automagically. */
|
|
|
ce426f |
+ in MODULE_NAME (libc, libpthread, etc.) automagically. */
|
|
|
ce426f |
|
|
|
ce426f |
# ifndef NOT_IN_libc
|
|
|
ce426f |
# define IN_LIB libc
|
|
|
ce426f |
@@ -45,7 +45,7 @@
|
|
|
ce426f |
# endif
|
|
|
ce426f |
|
|
|
ce426f |
# define LIBC_PROBE(name, n, ...) \
|
|
|
ce426f |
- LIBC_PROBE_1 (IN_LIB, name, n, ## __VA_ARGS__)
|
|
|
ce426f |
+ LIBC_PROBE_1 (MODULE_NAME, name, n, ## __VA_ARGS__)
|
|
|
ce426f |
|
|
|
ce426f |
# define LIBC_PROBE_1(lib, name, n, ...) \
|
|
|
ce426f |
STAP_PROBE##n (lib, name, ## __VA_ARGS__)
|
|
|
ce426f |
@@ -53,7 +53,7 @@
|
|
|
ce426f |
# define STAP_PROBE0 STAP_PROBE
|
|
|
ce426f |
|
|
|
ce426f |
# define LIBC_PROBE_ASM(name, template) \
|
|
|
ce426f |
- STAP_PROBE_ASM (IN_LIB, name, template)
|
|
|
ce426f |
+ STAP_PROBE_ASM (MODULE_NAME, name, template)
|
|
|
ce426f |
|
|
|
ce426f |
# define LIBC_PROBE_ASM_OPERANDS STAP_PROBE_ASM_OPERANDS
|
|
|
ce426f |
|
|
|
ce426f |
Index: glibc-2.17-c758a686/rtkaio/Makefile
|
|
|
ce426f |
===================================================================
|
|
|
ce426f |
--- glibc-2.17-c758a686.orig/rtkaio/Makefile
|
|
|
ce426f |
+++ glibc-2.17-c758a686/rtkaio/Makefile
|
|
|
ce426f |
@@ -70,7 +70,9 @@ CFLAGS-kaio_librt-cancellation.c = -fasy
|
|
|
ce426f |
LDFLAGS-rtkaio.so = -Wl,-soname=lib$(libprefix)rt.so$(librt.so-version) \
|
|
|
ce426f |
-Wl,--enable-new-dtags,-z,nodelete
|
|
|
ce426f |
CPPFLAGS-librtkaio += -UIN_MODULE -DIN_MODULE=MODULE_librt \
|
|
|
ce426f |
- -UIS_IN_librt -DIS_IN_librt=1 -I$(..)rt
|
|
|
ce426f |
+ -UMODULE_NAME -DMODULE_NAME=librt \
|
|
|
ce426f |
+ -UIS_IN_librt -DIS_IN_librt=1 \
|
|
|
ce426f |
+ -I$(..)rt
|
|
|
ce426f |
|
|
|
ce426f |
rpath-dirs := $(patsubst rt,rtkaio,$(rpath-dirs))
|
|
|
ce426f |
|