From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9961 invoked by alias); 22 May 2012 21:02:23 -0000 Received: (qmail 9949 invoked by uid 22791); 22 May 2012 21:02:22 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from dns0.mips.com (HELO dns0.mips.com) (12.201.5.70) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 May 2012 21:01:58 +0000 Received: from exchdb01.mips.com (exchhub01.mips.com [192.168.36.84]) by dns0.mips.com (8.13.8/8.13.8) with ESMTP id q4ML1vfj003006 for ; Tue, 22 May 2012 14:01:57 -0700 Received: from ubuntu-sellcey.mips.com (192.168.65.53) by exchhub01.mips.com (192.168.36.84) with Microsoft SMTP Server id 14.1.270.1; Tue, 22 May 2012 14:01:52 -0700 Received: by ubuntu-sellcey.mips.com (sSMTP sendmail emulation); Tue, 22 May 2012 14:01:52 -0700 From: "Steve Ellcey " Date: Tue, 22 May 2012 21:02:00 -0000 To: Subject: Building syscall.h on mips User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-ID: <7875050d-c4de-4bc2-8c4e-3295cc003761@EXCHHUB01.MIPS.com> X-EMS-Proccessed: 6LP3oGfGVdcdb8o1aBnt6w== X-EMS-STAMP: 2bVSVjvX4Nsn1Z+NkMDeoA== Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00129.txt.bz2 I am trying to build the ToT glibc on MIPS and am running into a problem. I build it 8 different ways for various versions and when I compile it with 'gcc -mips32', it fails to build. This is due to the syscall-list changes in glibc-ports/sysdeps/unix/sysv/linux/mips/Makefile. With these changes, the Makefile is trying to run GCC with '-mips32 -mabi=n32' which is an illegal combination. The -mips32 comes from my setting of CC and the -mabi=n32 is coming from syscall-list-n32-options in the Makefile. I was able to fix things with this patch: diff --git a/ports/sysdeps/unix/sysv/linux/mips/Makefile b/ports/sysdeps/unix/sy index 41e9258..a8aebf7 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/Makefile +++ b/ports/sysdeps/unix/sysv/linux/mips/Makefile @@ -9,11 +9,11 @@ sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h syscall-list-variants := o32 n32 n64 syscall-list-includes := sgidefs.h -syscall-list-o32-options := -mabi=32 +syscall-list-o32-options := -mips32 -march=mips32 syscall-list-o32-condition := _MIPS_SIM == _MIPS_SIM_ABI32 -syscall-list-n32-options := -mabi=n32 +syscall-list-n32-options := -mips32r2 -march=mips32r2 syscall-list-n32-condition := _MIPS_SIM == _MIPS_SIM_ABIN32 -syscall-list-n64-options := -mabi=64 +syscall-list-n64-options := -mips64 -march=mips64 syscall-list-n64-condition := _MIPS_SIM == _MIPS_SIM_ABI64 endif But I noticed that when I did this syscall.h had 3 sections, ifdefed using the above conditions and each one was identical. So rather then change the options I just removed them along with the conditions and syscall-list-variants. This gave me a syscall.h that looks very similar to glibc 1.14. The only difference is that the new file has an include of sgidefs.h. diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mip index 41e9258..2d5ec60 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -4,17 +4,8 @@ endif ifeq ($(subdir),misc) sysdep_routines += cachectl cacheflush sysmips _test_and_set - sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h - -syscall-list-variants := o32 n32 n64 syscall-list-includes := sgidefs.h -syscall-list-o32-options := -mabi=32 -syscall-list-o32-condition := _MIPS_SIM == _MIPS_SIM_ABI32 -syscall-list-n32-options := -mabi=n32 -syscall-list-n32-condition := _MIPS_SIM == _MIPS_SIM_ABIN32 -syscall-list-n64-options := -mabi=64 -syscall-list-n64-condition := _MIPS_SIM == _MIPS_SIM_ABI64 endif ifeq ($(subdir),elf) So, does this second patch look OK for glibc-ports for MIPS? Steve Ellcey sellcey@mips.com