From owner-freebsd-ports@FreeBSD.ORG Mon Jun 28 03:10:09 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CEC4106566B for ; Mon, 28 Jun 2010 03:10:09 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 642318FC0C for ; Mon, 28 Jun 2010 03:10:09 +0000 (UTC) Received: by iwn4 with SMTP id 4so294172iwn.13 for ; Sun, 27 Jun 2010 20:10:08 -0700 (PDT) Received: by 10.231.161.135 with SMTP id r7mr4855194ibx.47.1277694608175; Sun, 27 Jun 2010 20:10:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.194.147 with HTTP; Sun, 27 Jun 2010 20:09:47 -0700 (PDT) From: Eitan Adler Date: Sun, 27 Jun 2010 23:09:47 -0400 Message-ID: To: freebsd ports Content-Type: text/plain; charset=UTF-8 Subject: flag to tell ports that you are only building for yourself X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 03:10:09 -0000 I'd like to add a flag to tell ports that you are building only for yourself that and optimizations that typically are not enabled could be turned on. The first two that come to mind are -mtune=native and -march=native. Ports would be able to add more flags as needed. This could allow ports to optimize themselves to the architecture they on without losing the ability to cross build or have build clusters. --- old.port.mk 2010-06-27 23:01:04.000000000 -0400 +++ bsd.port.mk 2010-06-27 23:05:16.000000000 -0400 @@ -2282,6 +2282,10 @@ .endif .endif +.if defined (ONLY_FOR_SELF) +CFLAGS += -mtune=native -march=native -mcpu=native +.endif + .if defined(USE_CSTD) CFLAGS:= ${CFLAGS:N-std=*} -std=${USE_CSTD} .endif -- Eitan Adler