From owner-svn-src-all@freebsd.org Thu Dec 7 09:09:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A18E6E810D9; Thu, 7 Dec 2017 09:09:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 561017DB97; Thu, 7 Dec 2017 09:09:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 199B62603A1; Thu, 7 Dec 2017 10:09:30 +0100 (CET) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> From: Hans Petter Selasky Message-ID: <8803f80b-56ee-d6e1-e8a4-5060a5c5fccf@selasky.org> Date: Thu, 7 Dec 2017 10:06:45 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 09:09:32 -0000 On 12/07/17 02:41, Bryan Drewery wrote: > On 12/6/2017 4:53 PM, Hans Petter Selasky wrote: >> On 12/07/17 01:38, Bryan Drewery wrote: >>> 1. SUBDIR=../../somewhere else is inherently wrong. >>> 2. Building a library from a directory named '2' is wrong. >>> 3. Not just using proper SUBDIR_DEPEND and making all these subdirs is >>> not needed and complicates things MORE by splitting them all up. >>> 4. Building a library from a directory where its real bsd.lib.mk is not >>> at is wrong. >>> 5. Depending on an include directory in the Makefile.inc1 library >>> dependencies is simply not needed - I told you that. >> >> Try building the COMPAT 32-bit libraries with OFED and you'll see that >> this is needed! >> >>> 6. Using these /0 /1 /2 /3 directories actually hurts the 'make >>> libraries' parallelism/dependency graph. It ends up building /1 rather >>> than building libibcm and libibumad directly in its graph.  It creates >>> an indirection which adds more unneeded submake recursion. >> >> I think this is no argument over having to maintain and update >> Makefile.inc1 with all the dependencies every time there is a change or >> new driver library added to OFED. > > Here's the proper change to contrib/ofed/usr.lib/Makefile, it is trivial. > >> diff --git contrib/ofed/usr.lib/Makefile contrib/ofed/usr.lib/Makefile >> index 47b97591f5b7..9c22b889fa19 100644 >> --- contrib/ofed/usr.lib/Makefile >> +++ contrib/ofed/usr.lib/Makefile >> @@ -1,13 +1,24 @@ >> -SUBDIR= libibcommon libibmad libibumad libibverbs libmlx4 libmthca \ >> - libopensm libosmcomp libosmvendor libibcm librdmacm libsdp libcxgb4 >> +SUBDIR= \ >> + libibverbs \ >> + libibcm \ >> + libibumad \ >> + librdmacm \ >> + libibmad \ >> + libosmcomp \ >> + libosmvendor \ >> + libcxgb4 \ >> + libmlx4 \ >> + libmlx5 \ >> + libibnetdisc \ >> + libopensm >> >> SUBDIR_DEPEND_libcxgb4= libibverbs >> SUBDIR_DEPEND_libibcm= libibverbs >> -SUBDIR_DEPEND_libibmad= libibcommon libibumad >> -SUBDIR_DEPEND_libibumad= libibcommon >> +SUBDIR_DEPEND_libibmad= libibumad >> +SUBDIR_DEPEND_libibnetdisc= libosmcomp libibmad libibumad >> SUBDIR_DEPEND_libmlx4= libibverbs >> -SUBDIR_DEPEND_libmthca= libibverbs >> -SUBDIR_DEPEND_libosmvendor= libibumad libopensm libosmcomp >> +SUBDIR_DEPEND_libmlx5= libibverbs >> +SUBDIR_DEPEND_libosmvendor= libibumad >> SUBDIR_DEPEND_librdmacm= libibverbs >> SUBDIR_PARALLEL= >> > > And Makefile.inc1 which is even more simple. > >> @@ -2365,14 +2414,12 @@ _lib_libradius= lib/libradius >> .if ${MK_OFED} != "no" >> _ofed_lib= contrib/ofed/usr.lib >> _prebuild_libs+= contrib/ofed/usr.lib/libosmcomp >> -_prebuild_libs+= contrib/ofed/usr.lib/libopensm >> -_prebuild_libs+= contrib/ofed/usr.lib/libibcommon >> _prebuild_libs+= contrib/ofed/usr.lib/libibverbs >> +_prebuild_libs+= contrib/ofed/usr.lib/libibmad >> _prebuild_libs+= contrib/ofed/usr.lib/libibumad >> >> -contrib/ofed/usr.lib/libopensm__L: lib/libthr__L >> contrib/ofed/usr.lib/libosmcomp__L: lib/libthr__L >> -contrib/ofed/usr.lib/libibumad__L: contrib/ofed/usr.lib/libibcommon__L >> +contrib/ofed/usr.lib/libibmad__L: contrib/ofed/usr.lib/libibumad__L >> .endif Hi, FYI: The paths of the libraries are no longer correct. Running: sh tools/make_libdeps.sh $PWD Gives this list of actual dependencies: > contrib/ofed/libcxgb4: contrib/ofed/libibverbs lib/libthr > contrib/ofed/libibcm: contrib/ofed/libibverbs > contrib/ofed/libibmad: contrib/ofed/libibumad > contrib/ofed/libibnetdisc: contrib/ofed/opensm/complib contrib/ofed/libibmad contrib/ofed/libibumad > contrib/ofed/libmlx4: contrib/ofed/libibverbs lib/libthr > contrib/ofed/libmlx5: contrib/ofed/libibverbs lib/libthr > contrib/ofed/librdmacm: contrib/ofed/libibverbs > contrib/ofed/opensm/complib: lib/libthr > contrib/ofed/opensm/libopensm: lib/libthr > contrib/ofed/opensm/libvendor: contrib/ofed/libibumad lib/libthr All of this information is then in turn based on the given: LIBADD= XXX In the respective Makefiles. There is no need to duplicate this information. It should be pulled from of the existing OFED Makefiles. --HPS