Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd10a406

Browse files
committed
Use -fPIC not -fpic for BSDen on Sparc. Also switch from
$(LD) -x -Bshareable to $(CC) -shared on OpenBSD (I suspect thisshould be carried over to the other two as well, but will refrainpending suggestions from people who actually use those platforms).Per Stefan Kaltenbrunner.
1 parent2611285 commitd10a406

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

‎src/makefiles/Makefile.freebsd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ shlib_symbolic = -Wl,-Bsymbolic -lc
77
endif
88

99
DLSUFFIX = .so
10+
11+
ifeq ($(findstring sparc,$(host_cpu)), sparc)
12+
CFLAGS_SL = -fPIC -DPIC
13+
else
1014
CFLAGS_SL = -fpic -DPIC
15+
endif
16+
1117

1218
%.so: %.o
1319
ifdef ELF_SYSTEM

‎src/makefiles/Makefile.netbsd

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ rpath = -R$(libdir)
99
endif
1010

1111
DLSUFFIX = .so
12+
13+
ifeq ($(findstring sparc,$(host_cpu)), sparc)
14+
CFLAGS_SL = -fPIC -DPIC
15+
else
1216
CFLAGS_SL = -fpic -DPIC
17+
endif
18+
1319

1420
%.so: %.o
1521
ifdef ELF_SYSTEM
@@ -21,8 +27,7 @@ else
2127
@${AR} cq $@.pic `lorder $<.obj | tsort`
2228
${RANLIB} $@.pic
2329
@rm -f $@
24-
$(LD) -x -Bshareable -Bforcearchive \
25-
-o $@ $@.pic
30+
$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
2631
endif
2732

2833
sqlmansect = 7

‎src/makefiles/Makefile.openbsd

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,25 @@ shlib_symbolic = -Wl,-Bsymbolic
77
endif
88

99
DLSUFFIX = .so
10+
11+
ifeq ($(findstring sparc,$(host_cpu)), sparc)
12+
CFLAGS_SL = -fPIC -DPIC
13+
else
1014
CFLAGS_SL = -fpic -DPIC
15+
endif
16+
1117

1218
%.so: %.o
1319
ifdef ELF_SYSTEM
14-
$(LD) -x -Bshareable -o $@ $<
20+
$(CC) -shared -o $@ $<
1521
else
1622
$(LD) $(LDREL) $(LDOUT) $<.obj -x $<
1723
@echo building shared object $@
1824
@rm -f $@.pic
1925
@${AR} cq $@.pic `lorder $<.obj | tsort`
2026
${RANLIB} $@.pic
2127
@rm -f $@
22-
$(LD) -x -Bshareable -Bforcearchive \
23-
-o $@ $@.pic
28+
$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
2429
endif
2530

2631
sqlmansect = 7

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp