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