From owner-freebsd-ports Wed Sep 23 00:26:55 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA27840 for freebsd-ports-outgoing; Wed, 23 Sep 1998 00:26:55 -0700 (PDT) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from vader.cs.berkeley.edu (vader.CS.Berkeley.EDU [128.32.38.234]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA27830; Wed, 23 Sep 1998 00:26:48 -0700 (PDT) (envelope-from asami@vader.cs.berkeley.edu) Received: from silvia.hip.berkeley.edu (sji-ca3-55.ix.netcom.com [209.109.233.55]) by vader.cs.berkeley.edu (8.8.7/8.7.3) with ESMTP id AAA17926; Wed, 23 Sep 1998 00:26:45 -0700 (PDT) Received: (from asami@localhost) by silvia.hip.berkeley.edu (8.8.8/8.6.9) id AAA11574; Wed, 23 Sep 1998 00:26:41 -0700 (PDT) Date: Wed, 23 Sep 1998 00:26:41 -0700 (PDT) Message-Id: <199809230726.AAA11574@silvia.hip.berkeley.edu> To: imp@village.org CC: ports@FreeBSD.ORG, jdp@FreeBSD.ORG In-reply-to: <199809230657.AAA18463@harmony.village.org> (message from Warner Losh on Wed, 23 Sep 1998 00:57:16 -0600) Subject: Re: SOCKS port inspires question... From: asami@FreeBSD.ORG (Satoshi Asami) Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org * 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