X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f X-Recipient: djgpp-workers AT delorie DOT com Message-ID: <475D9CA6.60608@iki.fi> Date: Mon, 10 Dec 2007 22:08:06 +0200 From: Andris Pavenis User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: [PATCH] Fix GAS version detection Content-Type: multipart/mixed; boundary="------------070700040509010703000005" Reply-To: djgpp-workers AT delorie DOT com This is a multi-part message in MIME format. --------------070700040509010703000005 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Patch fixes GAS version detection for binutils-2.18. Verified to work under Linux with gas-2.17 and gas-2.18. Andris PS. Sometimes earlier I sent totally broken patch for the same purpose. This oone is at least tested. --------------070700040509010703000005 Content-Type: text/x-patch; name="gas_version.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gas_version.diff" Index: src/makefile.inc =================================================================== RCS file: /cvs/djgpp/djgpp/src/makefile.inc,v retrieving revision 1.10 diff -p -r1.10 makefile.inc *** src/makefile.inc 28 Jul 2003 20:11:45 -0000 1.10 --- src/makefile.inc 10 Dec 2007 19:56:15 -0000 *************** AS := $(subst \,/,$(AS)) *** 32,41 **** # Figure out GAS version for use in *.S and inline asm compile flags # ! GAS_VERSION := $(subst ., ,$(shell $(AS) --version)) ! GAS_MAJOR := $(word 3,$(GAS_VERSION)) ! GAS_MINOR := $(word 4,$(GAS_VERSION)) ! GAS_MINORMINOR := $(word 5,$(GAS_VERSION)) # Defaults for GAS version numbers ifeq ($(GAS_MAJOR),) --- 32,42 ---- # Figure out GAS version for use in *.S and inline asm compile flags # ! GAS_VERSION_STR:= $(shell $(AS) --version | sed 1q | sed -e 's:^.*\([0-9]\.[0-9][\.0-9]*\).*$$:\1:') ! GAS_VERSION := $(subst ., ,$(GAS_VERSION_STR)) ! GAS_MAJOR := $(word 1,$(GAS_VERSION)) ! GAS_MINOR := $(word 2,$(GAS_VERSION)) ! GAS_MINORMINOR := $(word 3,$(GAS_VERSION)) # Defaults for GAS version numbers ifeq ($(GAS_MAJOR),) --------------070700040509010703000005--