Re: [HACKERS] v6.4-BETA3 problems with FreeBSD

From: SHIOZAKI Takehiko <takehi-s(at)ascii(dot)co(dot)jp>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] v6.4-BETA3 problems with FreeBSD
Date: 1998-10-31 02:21:13
Message-ID: 199810310221.LAA13973@libpc01.pb.ascii.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[On Oct 29, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:]
>
>Can you provide an appropriate entry to add to Makefile.shlib for
>FreeBSD? It's probably much like one of the existing entries...

O.K.
I tried snapshot(Oct30) and made some patches.
# I think that it is confused to manage both Makefile.shlib and
# makefiles/Makefile.*, don't you?

* configure
Now FreeBSD 2.X is not supported..., so I added its entry.
If ELF_SYSTEM is set, gmake treat it defined even though
it is "false". So nothing should be set to use "ifdef".
BSD_SHLIB etc. may have same problems.

* Makefile.shlib
As you said, FreeBSD entry is much like BSD's.
I only added ELF_SYSTEM code.

* makefiles/Makefile.freebsd
Ifdef/else/endif can not be indented with TABs.

========================================================================
*** configure.in.orig Fri Oct 30 17:00:20 1998
--- configure.in Sat Oct 31 10:07:38 1998
***************
*** 17,23 ****
linux*) os=linux need_tas=no ;;
bsdi*) os=bsdi need_tas=no ;;
freebsd3*) os=freebsd need_tas=no elf=yes ;;
! freebsd1*) os=freebsd need_tas=no ;;
netbsd*|openbsd*) os=bsd need_tas=no ;;
dgux*) os=dgux need_tas=no ;;
aix*) os=aix need_tas=no ;;
--- 17,23 ----
linux*) os=linux need_tas=no ;;
bsdi*) os=bsdi need_tas=no ;;
freebsd3*) os=freebsd need_tas=no elf=yes ;;
! freebsd[12]*) os=freebsd need_tas=no ;;
netbsd*|openbsd*) os=bsd need_tas=no ;;
dgux*) os=dgux need_tas=no ;;
aix*) os=aix need_tas=no ;;
***************
*** 52,58 ****
then
ELF_SYS=true
else
! ELF_SYS=false
fi

if test "X$need_tas" = "Xyes"
--- 52,58 ----
then
ELF_SYS=true
else
! ELF_SYS=
fi

if test "X$need_tas" = "Xyes"
*** configure.orig Fri Oct 30 17:00:20 1998
--- configure Sat Oct 31 10:07:00 1998
***************
*** 617,623 ****
linux*) os=linux need_tas=no ;;
bsdi*) os=bsdi need_tas=no ;;
freebsd3*) os=freebsd need_tas=no elf=yes ;;
! freebsd1*) os=freebsd need_tas=no ;;
netbsd*|openbsd*) os=bsd need_tas=no ;;
dgux*) os=dgux need_tas=no ;;
aix*) os=aix need_tas=no ;;
--- 617,623 ----
linux*) os=linux need_tas=no ;;
bsdi*) os=bsdi need_tas=no ;;
freebsd3*) os=freebsd need_tas=no elf=yes ;;
! freebsd[12]*) os=freebsd need_tas=no ;;
netbsd*|openbsd*) os=bsd need_tas=no ;;
dgux*) os=dgux need_tas=no ;;
aix*) os=aix need_tas=no ;;
***************
*** 652,658 ****
then
ELF_SYS=true
else
! ELF_SYS=false
fi

if test "X$need_tas" = "Xyes"
--- 652,658 ----
then
ELF_SYS=true
else
! ELF_SYS=
fi

if test "X$need_tas" = "Xyes"
*** Makefile.shlib.orig Sat Oct 31 10:12:32 1998
--- Makefile.shlib Sat Oct 31 10:14:47 1998
***************
*** 56,61 ****
--- 56,74 ----
# Makefile.global (or really Makefile.port) to supply DLSUFFIX and other
# symbols.

+ ifeq ($(PORTNAME), freebsd)
+ ifdef BSD_SHLIB
+ install-shlib-dep := install-shlib
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ ifdef ELF_SYSTEM
+ LDFLAGS_SL := -x -Bshareable
+ else
+ LDFLAGS_SL := -x -Bshareable -Bforcearchive
+ endif
+ CFLAGS += $(CFLAGS_SL)
+ endif
+ endif
+
ifeq ($(PORTNAME), bsd)
ifdef BSD_SHLIB
install-shlib-dep := install-shlib
*** makefiles/Makefile.freebsd.orig Sat Oct 31 09:13:20 1998
--- makefiles/Makefile.freebsd Sat Oct 31 09:13:45 1998
***************
*** 5,13 ****
@${AR} cq $(at)(dot)pic `lorder $<.obj | tsort`
${RANLIB} $(at)(dot)pic
@rm -f $@
! ifdef ELF_SYSTEM
! $(LD) -x -Bshareable -o $@ $(at)(dot)pic
! else
! $(LD) -x -Bshareable -Bforcearchive -o $@ $(at)(dot)pic
! endif

--- 5,13 ----
@${AR} cq $(at)(dot)pic `lorder $<.obj | tsort`
${RANLIB} $(at)(dot)pic
@rm -f $@
! ifdef ELF_SYSTEM
! $(LD) -x -Bshareable -o $@ $(at)(dot)pic
! else
! $(LD) -x -Bshareable -Bforcearchive -o $@ $(at)(dot)pic
! endif

========================================================================

--
ASCII CORPORATION
Technical Center
SHIOZAKI Takehiko
<takehi-s(at)ascii(dot)co(dot)jp>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ryan Kirkpatrick 1998-10-31 02:39:38 Re: [PATCHES] Patches for Pgsql on Linux/Alpha (RE: Last Call...)
Previous Message Bruce Momjian 1998-10-31 02:15:01 Re: [PATCHES] Patches for Pgsql on Linux/Alpha (RE: Last Call...)