Skip to content

Commit a8c2f3a

Browse files
committed
Merge pull request #102 from ginggs/kfreebsd-hurd
Build on GNU/kfreeBSD and GNU/Hurd
2 parents 58e1dd9 + e3336dd commit a8c2f3a

70 files changed

Lines changed: 85 additions & 100 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Make.inc

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -82,37 +82,22 @@ override OS=WINNT
8282
endif
8383

8484
#keep these if statements separate
85-
ifeq ($(OS), WINNT)
86-
SHLIB_EXT = dll
87-
SONAME_FLAG = -soname
88-
CFLAGS_add += -nodefaultlibs
89-
shlibdir = $(bindir)
90-
else
91-
shlibdir = $(libdir)
92-
endif
93-
94-
ifeq ($(OS), Linux)
95-
SHLIB_EXT = so
96-
SONAME_FLAG = -soname
97-
CFLAGS_add+=-fPIC
98-
endif
99-
100-
ifeq ($(OS), FreeBSD)
101-
SHLIB_EXT = so
102-
SONAME_FLAG = -soname
103-
CFLAGS_add+=-fPIC
104-
endif
105-
106-
ifeq ($(OS), OpenBSD)
107-
SHLIB_EXT = so
108-
SONAME_FLAG = -soname
109-
CFLAGS_add+=-fPIC
110-
endif
11185

112-
ifeq ($(OS), Darwin)
113-
SHLIB_EXT = dylib
114-
SONAME_FLAG = -install_name
115-
CFLAGS_add+=-fPIC
86+
ifeq ($(OS), WINNT)
87+
SHLIB_EXT = dll
88+
SONAME_FLAG = -soname
89+
override CFLAGS_add += -nodefaultlibs
90+
shlibdir = $(bindir)
91+
else
92+
ifeq ($(OS), Darwin)
93+
SHLIB_EXT = dylib
94+
SONAME_FLAG = -install_name
95+
else
96+
SHLIB_EXT = so
97+
SONAME_FLAG = -soname
98+
endif
99+
override CFLAGS_add += -fPIC
100+
shlibdir = $(libdir)
116101
endif
117102

118103
# The target specific FLAGS_add

amd64/bsd_asm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363
#define _START_ENTRY .p2align 4,0x90
6464

65-
#if defined(__linux__) || defined(__FreeBSD__) || defined(__ELF__)
65+
#if defined(__ELF__)
6666
#define _ENTRY(x) .text; _START_ENTRY; \
6767
.globl CNAME(x); .type CNAME(x),@function; CNAME(x):
6868
#define END(x) .size x, . - x

amd64/e_remainder.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ ENTRY(remainder)
2525

2626

2727
/* Enable stack protection */
28-
#if defined(__linux__) && defined(__ELF__)
28+
#if defined(__ELF__)
2929
.section .note.GNU-stack,"",%progbits
3030
#endif

amd64/e_remainderf.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ ENTRY(remainderf)
2424

2525

2626
/* Enable stack protection */
27-
#if defined(__linux__) && defined(__ELF__)
27+
#if defined(__ELF__)
2828
.section .note.GNU-stack,"",%progbits
2929
#endif

amd64/e_remainderl.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ ENTRY(remainderl)
3030

3131

3232
/* Enable stack protection */
33-
#if defined(__linux__) && defined(__ELF__)
33+
#if defined(__ELF__)
3434
.section .note.GNU-stack,"",%progbits
3535
#endif

amd64/e_sqrt.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ END(sqrt)
3535

3636

3737
/* Enable stack protection */
38-
#if defined(__linux__) && defined(__ELF__)
38+
#if defined(__ELF__)
3939
.section .note.GNU-stack,"",%progbits
4040
#endif

amd64/e_sqrtf.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ END(sqrtf)
3434

3535

3636
/* Enable stack protection */
37-
#if defined(__linux__) && defined(__ELF__)
37+
#if defined(__ELF__)
3838
.section .note.GNU-stack,"",%progbits
3939
#endif

amd64/e_sqrtl.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ ENTRY(sqrtl)
4141
ret
4242

4343
/* Enable stack protection */
44-
#if defined(__linux__) && defined(__ELF__)
44+
#if defined(__ELF__)
4545
.section .note.GNU-stack,"",%progbits
4646
#endif

amd64/s_llrint.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ ENTRY(llrint)
77
END(llrint)
88

99
/* Enable stack protection */
10-
#if defined(__linux__) && defined(__ELF__)
10+
#if defined(__ELF__)
1111
.section .note.GNU-stack,"",%progbits
1212
#endif

amd64/s_llrintf.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ ENTRY(llrintf)
77
END(llrintf)
88

99
/* Enable stack protection */
10-
#if defined(__linux__) && defined(__ELF__)
10+
#if defined(__ELF__)
1111
.section .note.GNU-stack,"",%progbits
1212
#endif

0 commit comments

Comments
 (0)