Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Sep 1998 00:26:41 -0700 (PDT)
From:      asami@FreeBSD.ORG (Satoshi Asami)
To:        imp@village.org
Cc:        ports@FreeBSD.ORG, jdp@FreeBSD.ORG
Subject:   Re: SOCKS port inspires question...
Message-ID:  <199809230726.AAA11574@silvia.hip.berkeley.edu>
In-Reply-To: <199809230657.AAA18463@harmony.village.org> (message from Warner Losh on Wed, 23 Sep 1998 00:57:16 -0600)

next in thread | previous in thread | raw e-mail | index | archive | help
 * These guidelines say nothing about how to detect elf vs aout at
 * compile time, which was what I was asking about.
 * 
 * I could do something gross like:
 * 
 * .if ${PORTOBJECTFORMAT} == "elf"
 * 	CFLAGS += -DELF_FORMAT
 * .else
 * 	CFLAGS += -DAOUT_FORMAT
 * .endif
 * 
 * and test for ELF_FORMAT or AOUT_FORMAT in the code.  I was hoping for
 * something better, but will use that as a fallback.

That is exactly what people mean by "compile time" (as opposed to,
say, "run time").  If you meant "from inside the compiler", then I
don't know of any.

 * OK.  Right now the socks library is installed as libsocks5_sh.so, with
 * no version number.  That's why things are different.  It has been this
 * way for a very long time.  It isn't so much a library as it is a
 * shared object to be loaded before libc via the LD_PRELOAD mechanism.
 * I think that's why it doesn't have a version number on it, because a
 * version number would be irrelevant in all cases.

I see.

 * Also, objformat is insufficient because that tells the default format
 * of the system, and not the format of the executable you wish to run
 * with runsocks.
 * 
 * runsocks ftp prep.ai.mit.edu
 * 
 * should, imho, use the aout libsocks5_sh.so when `which ftp` is in
 * a.out format, reguardless of the output of objformat.  This is
 * important for legacy applications which are dynamically linked, but
 * which don't have socks support compiled in.  Until they are updated to
 * elf by the vendor, they must co-exist with the current scheme.
 * 
 * It sounds like I need to change the aout version of this port to
 * generate libsocks5_sh.so.1.0 and the elf version to generate
 * libsocks5_sh.so.1, rather than what is traditionally done (which is a
 * simple libsocks5_sh.so).  This would be enough to differentiate
 * between the two on a mixed system, and some smarts would need to be
 * added to runsocks.

Well, you are answering your own question here aren't you? :)

Satoshi

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809230726.AAA11574>