From owner-freebsd-current Wed Sep 9 23:58:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA12395 for freebsd-current-outgoing; Wed, 9 Sep 1998 23:58:11 -0700 (PDT) (envelope-from owner-freebsd-current@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 XAA12374; Wed, 9 Sep 1998 23:58:04 -0700 (PDT) (envelope-from asami@vader.cs.berkeley.edu) Received: from silvia.hip.berkeley.edu (sji-ca1-139.ix.netcom.com [209.109.232.139]) by vader.cs.berkeley.edu (8.8.7/8.7.3) with ESMTP id XAA23344; Wed, 9 Sep 1998 23:57:53 -0700 (PDT) Received: (from asami@localhost) by silvia.hip.berkeley.edu (8.8.8/8.6.9) id XAA10293; Wed, 9 Sep 1998 23:57:51 -0700 (PDT) Date: Wed, 9 Sep 1998 23:57:51 -0700 (PDT) Message-Id: <199809100657.XAA10293@silvia.hip.berkeley.edu> To: ports@FreeBSD.ORG CC: committers@FreeBSD.ORG, current@FreeBSD.ORG Subject: ELF transition for ports From: asami@cs.berkeley.edu (Satoshi Asami) Followup-to: ports@freebsd.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello everyone, Here is the guidelines for converting ports to ELF, and to use ports in the post-ELF world. You will need the latest bsd.port.mk (1.287 or 1.227.2.51) to use the converted ports. (Note that -stable users should also get the new bsd.port.mk if you want to use the latest ports.) Please be patient while we fix the ports tree to work on both a.out and ELF. Please report any breakages to the ports list. Thanks. Satoshi (and the great ELF team) ------- (1) Aout libraries should be moved out of /usr/local/lib and friends to an "aout" subdirectory. If you don't move them out of the way, elf ports will happily overwrite aout libraries. The "move-aout-libs" target in the -current src/Makefile (called from "aout-to-elf") will do this for you. It will only move aout libs so it is safe to call it on a system with both elf and aout libs in the standard directories. (2) The ports tree will build packages in the format the machine is in. This means aout for 2.2-stable and aout or elf for 3.0-current depending on what `objformat` returns. Also, once users convert to elf with (1) (i.e., move aout libraries to a subdirectory), building aout libraries will be unsupported. (It may still work if they know what they are doing, but they are on their own.) (3) bsd.port.mk will set PORTOBJFORMAT to "aout" or "elf" and export it in the environments CONFIGURE_ENV and MAKE_ENV. (It's always going to be "aout" in -stable). It is also passed to PLIST_SUB as "PORTOBJFORMAT=${PORTOBJFORMAT}". (See (6) below.) The variable is set using this line: PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout Ports' make processes are patched to use this variable to decide what to do. In particular, there shall be no minor number in an elf lib. Also, assuming "cc -shared" is used rather than "ld" directly, the only difference is that they need to add "-Wl,-soname,foo.so.3" on the command line. Also, they will have to install a symlink "libfoo.so" -> "libfoo.so.3". (4) For aout libs, all minor numbers shall be zero. That means many ports (those with a non-zero minor) will have to have their major number bumped by one. There seem to be about 80 of them that need to be fixed: ## grep 'lib.*\.so\..*\..*' */*/pkg/PLIST > t ## cat t | sed -e 's/:.*//' | uniq | wc 143 143 3622 ## grep -v '\.0$' t | sed -e 's/:.*//' | uniq | wc 80 80 2019 ^^ (These are the ones that don't end with ".0".) All port Makefiles are edited to remove minor numbers from LIB_DEPENDS, and also to have the regexp support removed. (E.g., "foo\\.1\\.\\(33|40\\)" -> "foo.2". They will be matched using "grep -wF". (5) pkg/PLIST should contain the short (elf) shlib names. bsd.port.mk will add ".0" to the end of shlib lines if PORTOBJFORMAT==aout in generate-plist. (6) The ldconfig line in Makefiles should read: ${SETENV} OBJFORMAT=${PORTOBJFORMAT} /sbin/ldconfig -m .... and in pkg/PLIST: @exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m ... @unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message