From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtprelay01.ispgateway.de ([80.67.31.39]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1RovpX-00089J-Rc for ptxdist@pengutronix.de; Sun, 22 Jan 2012 12:43:28 +0100 Received: from [88.217.113.105] (helo=galilei.fritz.box) by smtprelay01.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1RovpX-0008AC-AK for ptxdist@pengutronix.de; Sun, 22 Jan 2012 12:43:27 +0100 From: Bernhard Walle Date: Sun, 22 Jan 2012 12:43:12 +0100 Message-Id: <1327232595-25378-1-git-send-email-bernhard@bwalle.de> Subject: [ptxdist] Fix missing elf.h on Darwin Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de This patch series is an attempt to solve the problem that Darwin has no /usr/include/elf.h. I'm sure that other non-Linux but POSIX-compatible operating systems have no /usr/include/elf.h, so it should not only increase portability for Mac OS but also for *BSD. I think there are various ways to implement an solution, this one is based on a newly created elf-h-compat package that uses autoconf to check if there's already a elf.h present and if yes, it does nothing on "make install". Otherwise, an own copy of elf.h that is sufficient to compile the kernel and module-init-tools is installed, which results in sysroot-host/include/elf.h. The rest of the patches just add the dependencies and set the CFLAGS. Some words on alternatives: I played a bit with libelf to provide the required headers, but they don't have elf.h and even a compat-elf.h that includes gelf.h doesn't bring all required defines. On the other side building libelf just to get a few definitions is overkill. Modifying the kernel build system to use its own copy of elf.h (basically ) isn't easy either and will not help module-init-tools (didn't check kmod). Using the elf.h from the cross-toolchain would involve bringing the include path of the cross toolchain in the include path of the host which I'm sure will generate more problems. Of course I'm open for alternatives, but discussion without suggesting a solution doesn't work in most Open Source projects. ;-) -- ptxdist mailing list ptxdist@pengutronix.de