From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7700 invoked by alias); 1 Jun 2003 07:01:26 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 7575 invoked from network); 1 Jun 2003 07:01:25 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sources.redhat.com with SMTP; 1 Jun 2003 07:01:25 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 5070AD34B8; Sun, 1 Jun 2003 00:01:14 -0700 (PDT) Date: Sun, 01 Jun 2003 07:01:00 -0000 From: Joel Brobecker To: gcc-patches@gcc.gnu.org Cc: gdb-patches@sources.redhat.com Subject: [RFA] Fix libiberty compilation failure on systems running AiX 4.x Message-ID: <20030601070114.GJ919@gnat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="jq0ap7NbKX2Kqbes" Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2003-06/txt/msg00008.txt.bz2 --jq0ap7NbKX2Kqbes Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 4533 Hello, The following change in libiberty works for Aix 5.x, but breaks the build on AiX 4.x: 2003-02-22 Kaveh R. Ghazi * configure.in: Check for sys/systemcfg.h and _system_configuration. * physmem.c: Add support for AIX. Tweek formatting as per upstream coreutils beta. This is because the _system_configuration structure does not contain a field named "physmem", which is used in physmem.c: #if HAVE__SYSTEM_CONFIGURATION /* This works on AIX. */ return _system_configuration.physmem; #endif For the record, I have pasted at then end of this message the definition of this varible on a machine running 4.3.2 . Given that the only field in _system_configuration used is "physmem", the attached patch seemed to be the simplest change to get back the build on AiX 4.x machines. I essentially deactivated the test for _system_configuration on machines running AiX 4.x. 2003-06-01 J. Brobecker * configure.in: Deactivate the test for _system_configuration for *-*-aix4*. * configure: Regenerate. I have verified this test by verifying that GDB builds again on AiX 4.3.2 and by verifying that the config.h file generated on AiX 5.1 was unchanged by the change in configure.in. Ok to apply? (I have an FSF assignment on file via Ada Core Technologies) Thanks. The _system_configuration definition on 4.3.2: << extern struct { int architecture; /* processor architecture */ int implementation; /* processor implementation */ int version; /* processor version */ int width; /* width (32 || 64) */ int ncpus; /* 1 = UP, n = n-way MP */ int cache_attrib; /* cache attributes (bit flags) */ /* bit 0/1 meaning */ /* -------------------------------------*/ /* 31 no cache / cache present */ /* 30 separate I and D / combined */ int icache_size; /* size of L1 instruction cache */ int dcache_size; /* size of L1 data cache */ int icache_asc; /* L1 instruction cache associativity */ int dcache_asc; /* L1 data cache associativity */ int icache_block; /* L1 instruction cache block size */ int dcache_block; /* L1 data cache block size */ int icache_line; /* L1 instruction cache line size */ int dcache_line; /* L1 data cache line size */ int L2_cache_size; /* size of L2 cache, 0 = No L2 cache */ int L2_cache_asc; /* L2 cache associativity */ int tlb_attrib; /* TLB attributes (bit flags) */ /* bit 0/1 meaning */ /* -------------------------------------*/ /* 31 no TLB / TLB present */ /* 30 separate I and D / combined */ int itlb_size; /* entries in instruction TLB */ int dtlb_size; /* entries in data TLB */ int itlb_asc; /* instruction tlb associativity */ int dtlb_asc; /* data tlb associativity */ int resv_size; /* size of reservation */ int priv_lck_cnt; /* spin lock count in supevisor mode */ int prob_lck_cnt; /* spin lock count in problem state */ int rtc_type; /* RTC type */ int virt_alias; /* 1 if hardware aliasing is supported */ int cach_cong; /* number of page bits for cache synonym */ int model_arch; /* used by system for model determination */ int model_impl; /* used by system for model determination */ int Xint; /* used by system for time base conversion */ int Xfrac; /* used by system for time base conversion */ int kernel; /* kernel attributes */ /* bit 0/1 meaning */ /* -----------------------------------------*/ /* 31 32-bit kernel / 64-bit kernel */ }_system_configuration; >> -- Joel --jq0ap7NbKX2Kqbes Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="libiberty.diff" Content-length: 843 Index: configure.in =================================================================== RCS file: /cvs/src/src/libiberty/configure.in,v retrieving revision 1.46 diff -c -r1.46 configure.in *** configure.in 7 May 2003 18:06:23 -0000 1.46 --- configure.in 1 Jun 2003 06:39:15 -0000 *************** *** 350,355 **** --- 350,363 ---- case "${host}" in + *-*-aix4*) + # The _system_configuration variable on AiX 4.x does not contain the + # field "physmem", which is the only field used in this structure by + # libiberty. So no need to check the availability of that variable + # on such systems. + vars="`echo $vars | sed -e 's/_system_configuration//'`" + ;; + *-*-cygwin*) # The Cygwin library actually uses a couple of files from # libiberty when it is built. If we are building a native --jq0ap7NbKX2Kqbes--