NetBSD Problem Report #45784
From shattered@NetBSD.org Thu Jan 5 12:46:40 2012
Return-Path: <shattered@NetBSD.org>
Received: by www.NetBSD.org (Postfix, from userid 1427)
id B373E63BC35; Thu, 5 Jan 2012 12:46:40 +0000 (UTC)
Message-Id: <20120105124640.B373E63BC35@www.NetBSD.org>
Date: Thu, 5 Jan 2012 12:46:40 +0000 (UTC)
From: shattered@NetBSD.org
Reply-To: shattered@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: devel/cpuflags 1.42 detects wrong GCC flags on hp700
X-Send-Pr-Version: 3.95
>Number: 45784
>Category: pkg
>Synopsis: devel/cpuflags 1.42 detects wrong GCC flags on hp700
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: abs
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 05 12:50:00 +0000 2012
>Last-Modified: Wed Jul 24 21:15:00 +0000 2013
>Originator: Sergey Svishchev
>Release: NetBSD 5.99.59
>Organization:
>Environment:
>Description:
cpuflags defaults to '-march=native', which is only valid on x86 platforms.
>How-To-Repeat:
Read the code:
# native arch
M_ARCH_NATIVE='-march=native'
# Determine the flags for this OS/machine
extract_hw_details
if [ $(gcc_ser $CC) -gt 4002 ] ; then
ARCH="$M_ARCH_NATIVE"
else
ARCH=$(determine_arch)
fi
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->abs
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Fri, 06 Jan 2012 01:24:30 +0000
Responsible-Changed-Why:
over to maintainer
(while you're there, please set LICENSE, thanks)
From: Michai Ramakers <m.ramakers@gmail.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/45784
Date: Wed, 24 Jul 2013 19:32:26 +0200
On a relatively clean 6.1.0 install, I find using cpuflags breaks
(pkgsrc) build because of a seemingly unsupported "-march=native"
flag.
---
$ uname -a
NetBSD dwarf.LAN 6.1.0_PATCH NetBSD 6.1.0_PATCH (MIC) #0: Mon Jul 22
22:41:14 UTC 2013 root@:/usr/src/sys/arch/i386/compile/MIC i386
$ cpuflags
-mfpmath=sse -msse3 -march=native
$ cat /etc/mk.conf
.sinclude "/usr/pkg/share/mk/cpuflags.mk"
COPTS?= -pipe ${DEFCOPTS}
CFLAGS+=-pipe
$ echo 'int main( void ) { return 1; }' > c.c
$ cc -march=native c.c
c.c:1:0: error: bad value (native) for -march= switch
$ pkg_info cpuflags | head -n 1
Information for cpuflags-1.42:
$ gcc --version
gcc (NetBSD nb2 20110806) 4.5.3
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
---
I noticed this issue while building lang/perl5 from pkgsrc 2013Q2, but
I hope the above isolates the issue enough (i.e. it is not
package-related).
Michai
From: Sergey Svishchev <svs@ropnet.ru>
To: Michai Ramakers <m.ramakers@gmail.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/45784
Date: Thu, 25 Jul 2013 01:05:56 +0400
On Wed, Jul 24, 2013 at 05:35:00PM +0000, Michai Ramakers wrote:
>The following reply was made to PR pkg/45784; it has been noted by GNATS.
>
>From: Michai Ramakers <m.ramakers@gmail.com>
>To: gnats-bugs@NetBSD.org
>Cc:
>Subject: Re: pkg/45784
>Date: Wed, 24 Jul 2013 19:32:26 +0200
>
> On a relatively clean 6.1.0 install, I find using cpuflags breaks
> (pkgsrc) build because of a seemingly unsupported "-march=native"
> flag.
Toolchain issue IMO -- this flag is defined since gcc 4.2.
--
Sergey Svishchev
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.