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

Commita0b7daa

Browse files
committed
Apply freebsd specific patches dealign with ELF system from FreeBSD'sports collection ...
1 parent61f618e commita0b7daa

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

‎src/Makefile.shlib

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 1998, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.8 1999/04/30 02:04:49 momjian Exp $
9+
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.9 1999/05/1704:13:24 scrappy Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -59,10 +59,11 @@ install-shlib-dep :=
5959
ifeq ($(PORTNAME), freebsd)
6060
ifdef BSD_SHLIB
6161
install-shlib-dep:= install-shlib
62-
shlib:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
6362
ifdef ELF_SYSTEM
64-
LDFLAGS_SL:= -x -Bshareable
63+
shlib:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
64+
LDFLAGS_SL:= -x -shared -soname $(shlib)
6565
else
66+
shlib:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
6667
LDFLAGS_SL:= -x -Bshareable -Bforcearchive
6768
endif
6869
CFLAGS+= $(CFLAGS_SL)

‎src/backend/port/dynloader/freebsd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,13 @@ BSD44_derived_dlsym(void *handle, const char *name)
8383
void*vp;
8484
charbuf[BUFSIZ];
8585

86+
#ifndef__ELF__
8687
if (*name!='_')
8788
{
8889
sprintf(buf,"_%s",name);
8990
name=buf;
9091
}
92+
#endif
9193
if ((vp=dlsym(handle, (char*)name))== (void*)NULL)
9294
sprintf(error_message,"dlsym (%s) failed",name);
9395
returnvp;

‎src/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,8 @@ case "$host_os" in
625625
aux*) os=aux need_tas=no ;;
626626
linux*) os=linux need_tas=no ;;
627627
bsdi*) os=bsdi need_tas=no ;;
628-
freebsd3*|freebsd4*) os=freebsd need_tas=no elf=yes ;;
629628
freebsd1*|freebsd2*) os=freebsd need_tas=no ;;
629+
freebsd*) os=freebsd need_tas=no elf=yes ;;
630630
netbsd*)
631631
os=bsd need_tas=no
632632
case"$host_cpu"in

‎src/configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ case "$host_os" in
2020
aux*) os=aux need_tas=no ;;
2121
linux*) os=linux need_tas=no ;;
2222
bsdi*) os=bsdi need_tas=no ;;
23-
freebsd3*|freebsd4*) os=freebsd need_tas=no elf=yes ;;
2423
freebsd1*|freebsd2*) os=freebsd need_tas=no ;;
24+
freebsd*) os=freebsd need_tas=no elf=yes ;;
2525
netbsd*)
2626
os=bsd need_tas=no
2727
case "$host_cpu" in

‎src/makefiles/Makefile.freebsd

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
ifdef ELF_SYSTEM
2+
LDFLAGS+=-export-dynamic
3+
endif
4+
15
%.so: %.o
6+
ifdef ELF_SYSTEM
7+
$(LD) -x -shared -o $@ $<
8+
else
29
$(LD) -x -r -o $<.obj $<
310
@echo building shared object $@
411
@rm -f $@.pic
512
@${AR} cq $@.pic `lorder $<.obj | tsort`
613
${RANLIB} $@.pic
714
@rm -f $@
8-
ifdef ELF_SYSTEM
9-
$(LD) -x -Bshareable -o $@ $@.pic
10-
else
1115
$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
1216
endif
1317

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp