Re: [HACKERS] More on shared objects problem

From: Jaromir Dolecek <dolecek(at)ics(dot)muni(dot)cz>
To: pgsql-hackers(at)postgreSQL(dot)org
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] More on shared objects problem
Date: 1999-07-27 17:36:39
Message-ID: 199907271736.TAA01968@jdolecek.per4mance.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

D'Arcy" "J.M." Cain wrote:
> Thus spake Tom Lane
> > "D'Arcy" "J.M." Cain <darcy(at)druid(dot)net> writes:
> > > glaccount.so:
> > > -lpq => /usr/pgsql/lib/libpq.so
> > > -lc.12 => /usr/lib/libc.so.12
> >
> > Actually, do you even need libpq? That's a client-side library; I don't
> > think it should get linked into shlibs that are intended to be dynlinked
> > into the server...
>
> Yah, I was just trying stuff. As it turns out, PostgreSQL doesn't
> recognize NetBSD as an ELF system unless it is a powerpc. That's
> probably correct as it is only -current that is ELF, not the release.

Actually, alpha is ELF from the day one too. mips is ELF from
the 1.3.X release IIRC. Just the i386 & sparc
have been switched to ELF recently. With exception of x68k & pc532,
ELF is accross the board now.

> If it helps, here is the output of "file /netbsd" which tells you for
> sure it is an ELF system.
>
> /netbsd: ELF 32-bit LSB executable, Intel 80386, version 1, statically linked, not stripped
>
> so;
>
> if [ "`file /netbsd | cut -d' ' -f2`" = "ELF" ]
> then elf=yes
> fi
>
> Under the netbsd secion of configure_in should do it.

A bit more sane would be to compile and run this little program on NetBSD:
int main() {
#ifdef __ELF__
return 1;
#else
return 0;
#endif
}

ELFism of userland is independant of kernel (ELF kernel can run
with a.out userland & a.out kernel can run ELF userland), so this
method is probably safer.

--
Jaromir Dolecek <dolecek(at)ics(dot)muni(dot)cz> http://www.ics.muni.cz/~dolecek/
"The only way how to get rid temptation is to yield to it." -- Oscar Wilde

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Brownlee 1999-07-27 17:45:55 Re: [HACKERS] More on shared objects problem
Previous Message D'Arcy J.M. Cain 1999-07-27 17:24:30 Re: [HACKERS] More on shared objects problem