From owner-cvs-all Mon Sep 14 21:29:50 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA23221 for cvs-all-outgoing; Mon, 14 Sep 1998 21:29:50 -0700 (PDT) (envelope-from owner-cvs-all) Received: from metal.intt.org (metal.intt.org [206.109.108.186]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA23199 for ; Mon, 14 Sep 1998 21:29:40 -0700 (PDT) (envelope-from smace@metal.intt.org) Received: (from smace@localhost) by metal.intt.org (8.9.1/8.9.1) id XAA10441 for committers@freebsd.org; Mon, 14 Sep 1998 23:29:20 -0500 (CDT) From: Scott Mace Message-Id: <199809150429.XAA10441@metal.intt.org> Subject: ports being converted to ELF... To: committers@freebsd.org Date: Mon, 14 Sep 1998 23:29:19 -0500 (CDT) X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Before everyone converts their favorite port lib to ELF, please be sure you actually convert it to elf and not just change its install filename... I have seen several conversions to ELF that aren't. Scott ------------------------------------------------------------------ Date: Wed, 9 Sep 1998 23:57:51 -0700 (PDT) From: asami@cs.berkeley.edu (Satoshi Asami) To: ports@FreeBSD.ORG Cc: committers@FreeBSD.ORG, current@FreeBSD.ORG Subject: ELF transition for ports Message-ID: <199809100657.XAA10293@silvia.hip.berkeley.edu> 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