diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2015-10-21 17:36:54 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2015-10-21 17:36:54 +0300 |
commit | be48aa5fdd8d10973a6f938f84ff125c4cecf732 (patch) | |
tree | 5855e30d76153eb7e2ce42e4346517e2ee54b94d | |
parent | aeffcdeac9af6eaccb8c58af4e99414cf5ae51fd (diff) | |
download | illumos-packaging-be48aa5fdd8d10973a6f938f84ff125c4cecf732.tar.gz |
Adding libm
-rw-r--r-- | libc/debian/patches/libm-as.patch | 92 | ||||
-rw-r--r-- | libc/debian/patches/libm-fgnu89-inline.patch | 16 | ||||
-rw-r--r-- | libc/debian/patches/series | 2 | ||||
-rwxr-xr-x | libc/debian/rules | 1 |
4 files changed, 111 insertions, 0 deletions
diff --git a/libc/debian/patches/libm-as.patch b/libc/debian/patches/libm-as.patch new file mode 100644 index 0000000..e65256f --- /dev/null +++ b/libc/debian/patches/libm-as.patch @@ -0,0 +1,92 @@ +Index: libc/usr/src/lib/libm/common/C/libm.h +=================================================================== +--- libc.orig/usr/src/lib/libm/common/C/libm.h ++++ libc/usr/src/lib/libm/common/C/libm.h +@@ -52,9 +52,9 @@ + #if defined(__sparc) + + #define LIBM_ANSI_PRAGMA_WEAK(sym,stype) \ +- .weak __/**/sym; \ +- .type __/**/sym,#stype; \ +-__/**/sym = sym ++ .weak __##sym; \ ++ .type __##sym,#stype; \ ++__##sym = sym + + #ifndef SET_FILE + #define SET_FILE(x) \ +@@ -110,29 +110,29 @@ __/**/sym = sym + #define MCOUNT_SIZE (9*4) /* 9 instructions */ + #define MCOUNT(x) \ + save %sp, -SA(MINFRAME), %sp; \ +- sethi %hh(.L_/**/x/**/1), %o0; \ +- sethi %lm(.L_/**/x/**/1), %o1; \ +- or %o0, %hm(.L_/**/x/**/1), %o0; \ +- or %o1, %lo(.L_/**/x/**/1), %o1; \ ++ sethi %hh(.L_##x##1), %o0; \ ++ sethi %lm(.L_##x##1), %o1; \ ++ or %o0, %hm(.L_##x##1), %o0; \ ++ or %o1, %lo(.L_##x##1), %o1; \ + sllx %o0, 32, %o0; \ + call _mcount; \ + or %o0, %o1, %o0; \ + restore; \ +- .common .L_/**/x/**/1, 8, 8 ++ .common .L_##x##1, 8, 8 + #elif defined(PIC32) + #define MCOUNT_SIZE (10*4) /* 10 instructions */ + #define MCOUNT(x) \ + save %sp,-SA(MINFRAME),%sp; \ + 1: call .+8; \ + sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)),%o0; \ +- sethi %hi(.L_/**/x/**/1),%o1; \ ++ sethi %hi(.L_##x##1),%o1; \ + add %o0,%lo(_GLOBAL_OFFSET_TABLE_-(1b-.)),%o0; \ +- add %o1,%lo(.L_/**/x/**/1),%o1; \ ++ add %o1,%lo(.L_##x##1),%o1; \ + add %o0,%o7,%o0; \ + call _mcount; \ + ldx [%o0+%o1],%o0; \ + restore; \ +- .common .L_/**/x/**/1,8,8 ++ .common .L_##x##1,8,8 + #else /* PIC13 */ + #define MCOUNT_SIZE (8*4) /* 8 instructions */ + #define MCOUNT(x) \ +@@ -142,18 +142,18 @@ __/**/sym = sym + add %o0,%lo(_GLOBAL_OFFSET_TABLE_-(1b-.)),%o0; \ + add %o0,%o7,%o0; \ + call _mcount; \ +- ldx [%o0+%lo(.L_/**/x/**/1)],%o0; \ ++ ldx [%o0+%lo(.L_##x##1)],%o0; \ + restore; \ +- .common .L_/**/x/**/1,8,8 ++ .common .L_##x##1,8,8 + #endif /* !defined(PIC) */ + #endif /* defined(PROF) && defined(__sparcv9) */ + + #elif defined(__x86) + + #define LIBM_ANSI_PRAGMA_WEAK(sym,stype) \ +- .weak __/**/sym; \ +- .type __/**/sym,@stype; \ +-__/**/sym = sym ++ .weak __##sym; \ ++ .type __##sym,@stype; \ ++__##sym = sym + + #ifdef PIC + #if defined(__amd64) +@@ -168,9 +168,9 @@ __/**/sym = sym + #else + #define PIC_SETUP(label) \ + pushl %ebx; \ +- call .label; \ +-.label: popl %ebx; \ +- addl $_GLOBAL_OFFSET_TABLE_+[.-.label],%ebx ++ call .##label; \ ++.##label: popl %ebx; \ ++ addl $_GLOBAL_OFFSET_TABLE_+[.-.##label],%ebx + #define PIC_WRAPUP popl %ebx + #define PIC_F(x) x@PLT + #define PIC_G(x) x@GOT(%ebx) diff --git a/libc/debian/patches/libm-fgnu89-inline.patch b/libc/debian/patches/libm-fgnu89-inline.patch new file mode 100644 index 0000000..5994091 --- /dev/null +++ b/libc/debian/patches/libm-fgnu89-inline.patch @@ -0,0 +1,16 @@ +Index: libc/usr/src/lib/libm/Makefile.libm.com +=================================================================== +--- libc.orig/usr/src/lib/libm/Makefile.libm.com ++++ libc/usr/src/lib/libm/Makefile.libm.com +@@ -53,6 +53,11 @@ CPPFLAGS += -I$(LIBMSRC)/C \ + CFLAGS += -_gcc=-D__C99FEATURES__ + CFLAGS64 += -_gcc=-D__C99FEATURES__ + ++ ++# for __inline__ ++CFLAGS += -_gcc=-fgnu89-inline ++CFLAGS64 += -_gcc=-fgnu89-inline ++ + # libm depends on integer overflow characteristics + CFLAGS += -_gcc=-fno-strict-overflow + CFLAGS64 += -_gcc=-fno-strict-overflow diff --git a/libc/debian/patches/series b/libc/debian/patches/series index 63168f2..c6fa8fe 100644 --- a/libc/debian/patches/series +++ b/libc/debian/patches/series @@ -128,3 +128,5 @@ libc-no-gets.patch libc-fp_data-__huge_val.patch libnsl-netname.patch localeimpl-getenv.patch +libm-as.patch +libm-fgnu89-inline.patch diff --git a/libc/debian/rules b/libc/debian/rules index bb944b1..1f394b2 100755 --- a/libc/debian/rules +++ b/libc/debian/rules @@ -43,6 +43,7 @@ libs := \ common \ libavl \ libc \ +libm \ libc_db \ libgen \ libcrypt \ |