From patchwork Mon Feb 11 19:03:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 219668 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 9EB0F2C02BC for ; Tue, 12 Feb 2013 06:03:22 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1361214202; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: From:To:Cc:Subject:Date:Message-ID:User-Agent:MIME-Version: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=g+jouNz XNMvdJLLownzKM7x4chw=; b=kEmBY7CazEi4R07eN42eS+YRq5r2PdhgZabVFZD lSO0yZMqFTTeVXkDoPp9twIFTfVDDZaKA6mLScODZOl13bB4ejHPwvkoYWLLx0wQ iwWfv5qs4CBY65bCDJC9/l5tLl2gjIXg7Gznn1tviNrHGzC2sIDQqCtlAq2L07iw mdGI= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:X-Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=myBj6PfIzy9ymoqqLBITRu4a2TxSI1V+/mVOsD6ftaQF8s1K3cZmKjifQKI0oW 50amFdoIU4fRVtFfYWW/jv7tN7ltZiAicsi7RBcaYk9cJ7cgXg8sTGx5RUyA5421 Bw//ZpFLGNsSEJ2qMI3z7wZO4Rm7OaC1kvzvRqqWl4cXM=; Received: (qmail 17044 invoked by alias); 11 Feb 2013 19:03:16 -0000 Received: (qmail 17026 invoked by uid 22791); 11 Feb 2013 19:03:15 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, TW_LR, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mail-da0-f50.google.com (HELO mail-da0-f50.google.com) (209.85.210.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Feb 2013 19:03:10 +0000 Received: by mail-da0-f50.google.com with SMTP id h15so2874797dan.23 for ; Mon, 11 Feb 2013 11:03:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:user-agent :mime-version:content-type:x-gm-message-state; bh=0fY95Gt9Hq7Jjan55XkCOtQzeMxWGlTemf3E69o4pTY=; b=bckK1tgJf4rpgiUBnEyaTKH5uXkTRWUWsGCdyZ1w2DGdSNL1TyPqQtJWlWv0/7VITa VSNyvLMG9MwJ+MZJJTpu7O+iEK2GD1NTtyQ1f+msSJbk8J8K7ZRdalVTwje9sEzp275j r6yvxYyWKTyHKlYpzr22dlOrQhQks8dKhbs+tf8d/VC/GxA9w4m1SFcXcYuzOVZsu3kf 3XrI9SuRoChm0zRAaPrTx8OiuedU7iUqraIH4kW6jLqU6wluLVGx2BEgVQfqzynIhuAt OescQB80KqyoJnMGqoIa5ZwnxbWawjcOpicLXmJQA3BZzyxCmWJg27jwXEoVCwnS4P/M Al8A== X-Received: by 10.66.76.37 with SMTP id h5mr43362732paw.33.1360609389680; Mon, 11 Feb 2013 11:03:09 -0800 (PST) Received: from iant-glaptop.google.com ([172.19.251.60]) by mx.google.com with ESMTPS id l5sm68551409pax.10.2013.02.11.11.03.07 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 11 Feb 2013 11:03:09 -0800 (PST) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Cc: ro@TechFak.Uni-Bielefeld.DE Subject: libgo patch committed: Solaris portability patches Date: Mon, 11 Feb 2013 11:03:06 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmvrNr8UvvdZ4CmYohcLb4F5HH0YxG6u5vbWyFndqXDp5RDEsk5aavTbcGWroZOcw18AM/bcDsiociPZr5t39g6Di6DPXyVpCnpb6xap8nzQkZUH06ta+z0giROpTCjA2wlDAfXul8gpzP77bN1p/BilfsU8+IEG2IsjIbZf+Sx56YnAlcnVpGExzdKUUBfuPM4CqPO X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch from Rainer Orth in PR 56171 fixes some Solaris portability problems in libgo. * Check for nanosleep in -lrt. * Pass $(LIBS) when testing so that the tests use -lrt as needed. * Make sure that AF_LOCAL is defined. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r 4466c8235d4a libgo/Makefile.am --- a/libgo/Makefile.am Sat Feb 09 21:58:14 2013 -0800 +++ b/libgo/Makefile.am Mon Feb 11 10:56:06 2013 -0800 @@ -1997,7 +1997,7 @@ CHECK = \ GC="$(GOC) $(GOCFLAGS) $($(subst /,_,$@)_GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \ export GC; \ - GOLIBS="$(MATH_LIBS) $(NET_LIBS)"; \ + GOLIBS="$(MATH_LIBS) $(NET_LIBS) $(LIBS)"; \ export GOLIBS; \ RUNTESTFLAGS="$(RUNTESTFLAGS)"; \ export RUNTESTFLAGS; \ diff -r 4466c8235d4a libgo/configure.ac --- a/libgo/configure.ac Sat Feb 09 21:58:14 2013 -0800 +++ b/libgo/configure.ac Mon Feb 11 10:56:06 2013 -0800 @@ -413,8 +413,9 @@ AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS=-lpthread) AC_SUBST(PTHREAD_LIBS) -dnl Test if -lrt is required for sched_yield. +dnl Test if -lrt is required for sched_yield and/or nanosleep. AC_SEARCH_LIBS([sched_yield], [rt]) +AC_SEARCH_LIBS([nanosleep], [rt]) AC_C_BIGENDIAN diff -r 4466c8235d4a libgo/mksysinfo.sh --- a/libgo/mksysinfo.sh Sat Feb 09 21:58:14 2013 -0800 +++ b/libgo/mksysinfo.sh Mon Feb 11 10:56:06 2013 -0800 @@ -309,6 +309,13 @@ fi done +# The syscall package requires AF_LOCAL. +if ! grep '^const AF_LOCAL ' ${OUT} >/dev/null 2>&1; then + if grep '^const AF_UNIX ' ${OUT} >/dev/null 2>&1; then + echo "const AF_LOCAL = AF_UNIX" >> ${OUT} + fi +fi + # pathconf constants. grep '^const __PC' gen-sysinfo.go | sed -e 's/^\(const \)__\(PC[^= ]*\)\(.*\)$/\1\2 = __\2/' >> ${OUT}