From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7185 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: ideas for build system changes, bits refactoring Date: Wed, 11 Mar 2015 23:59:54 -0400 Message-ID: <20150312035954.GA31639@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1426132818 29876 80.91.229.3 (12 Mar 2015 04:00:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Mar 2015 04:00:18 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7198-gllmg-musl=m.gmane.org@lists.openwall.com Thu Mar 12 05:00:18 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YVuIB-0005aS-1M for gllmg-musl@m.gmane.org; Thu, 12 Mar 2015 05:00:15 +0100 Original-Received: (qmail 14268 invoked by uid 550); 12 Mar 2015 04:00:13 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 14177 invoked from network); 12 Mar 2015 04:00:08 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:7185 Archived-At: I'd like to start a list of ideas and discussion for changes we could make to the build system and arch bits. This has been on the agenda a long time but it's going to be more important as we get more ports, both as a way of managing complexity and as a way of fighting source tree bloat. Here are some ideas I have so far: 1. Generate all installable include files, even if just by copying, as part of the build. If nothing else, this will ensure that "make clean" followed by "make install" overwrites any (non-future-dated) preexisting files at the install destination; right now, that might fail to happen if changes were made at the install destination and the source timestamp is older. I think this will also make it easier to add out-of-tree build since there won't need to be separate logic for generated headers in-tree vs out-of-tree. It will also give us the option (not sure if we should take it) to merge bits into the main headers rather than having a bits dir under include. 2. Factor arch bits (types, struct layouts, constant values, etc.) as a sequence of overlays: a generic base, several common families like 32-bit, 64-bit, 64-bit+ILP32, ld-64, ld-80, ld-128, and finally arch-specific bits. The latter should be nearly empty for most archs. 3. Moving arch-specific build logic out of the configure script and into a makefile fragment in the arch dir. This should support the long-term goal of reducing/eliminating the work configure does and moving it to declarative rules in make. It also isolates port-specific logic with the port rather than hard-coding it in a shared script. 4. Eliminate the duplication of SYS_* and __NR_* in syscall.h bits by auto-generating one from the other as part of the build process. Rich