NetBSD Problem Report #49131

From www@NetBSD.org  Wed Aug 20 14:22:07 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1D752AE4A6
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 20 Aug 2014 14:22:07 +0000 (UTC)
Message-Id: <20140820142205.D0367AE4A7@mollari.NetBSD.org>
Date: Wed, 20 Aug 2014 14:22:05 +0000 (UTC)
From: venture37@geeklan.co.uk
Reply-To: venture37@geeklan.co.uk
To: gnats-bugs@NetBSD.org
Subject: security/openssl utilise aix-$CC configuration profiles, rather than just assume cc
X-Send-Pr-Version: www-1.0

>Number:         49131
>Category:       pkg
>Synopsis:       security/openssl utilise aix-$CC configuration profiles, rather than just assume cc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 20 14:25:00 +0000 2014
>Closed-Date:    Thu Aug 21 15:49:21 +0000 2014
>Last-Modified:  Thu Aug 21 15:50:01 +0000 2014
>Originator:     Sevan Janiyan
>Release:        pkgsrc-current
>Organization:
>Environment:
AIX l488pp067_pub 1 7 00F604884C00
>Description:
On AIX, openssl ignores $CC & defaults to using the aix-cc profile & building with /usr/vac/bin/cc, add the necessary checks to Makefile to use the correct profile depending on what CC/ABI is set to.
>How-To-Repeat:

>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/security/openssl/Makefile,v
retrieving revision 1.195
diff -u -r1.195 Makefile
--- Makefile    7 Aug 2014 01:29:45 -0000       1.195
+++ Makefile    20 Aug 2014 14:10:42 -0000
@@ -79,6 +79,21 @@
 .  else
 CONFIGURE_ARGS+=       darwin-${MACHINE_ARCH}-cc
 .  endif
+.elif ${OPSYS} == "AIX"
+CONFIGURE_SCRIPT=      ./Configure
+.if defined(ABI) && ${ABI} == "64"
+.if !empty(CC_VERSION:Mgcc*)
+CONFIGURE_ARGS+=       aix64-gcc
+.elif
+CONFIGURE_ARGS+=       aix64-cc
+.endif
+.else
+.if !empty(CC_VERSION:Mgcc*)
+CONFIGURE_ARGS+=       aix-gcc
+.elif
+CONFIGURE_ARGS+=       aix-cc
+.endif
+.endif

 .include "../../mk/dlopen.buildlink3.mk"


>Release-Note:

>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/49131: security/openssl utilise aix-$CC configuration
 profiles, rather than just assume cc
Date: Wed, 20 Aug 2014 17:33:05 +0200

 On Wed, Aug 20, 2014 at 02:25:00PM +0000, venture37@geeklan.co.uk wrote:
 > >Environment:
 > AIX l488pp067_pub 1 7 00F604884C00

 Wow, neat.

 > >Description:
 > On AIX, openssl ignores $CC & defaults to using the aix-cc profile & building with /usr/vac/bin/cc, add the necessary checks to Makefile to use the correct profile depending on what CC/ABI is set to.

 compiler support is abstracted away into pkgsrc/mk/compiler.mk and the
 files in pkgsrc/mk/compiler/*. I think that's a better place to add
 support for aix versions of gcc (or a native compiler, if there is
 one).

 Can you take a look at these files? Come back with questions, or a patch if you can :)

 Thanks,
  Thomas

From: venture37 <venture37@geeklan.co.uk>
To: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, 
 gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Cc: 
Subject: Re: pkg/49131: security/openssl utilise aix-$CC configuration profiles,
 rather than just assume cc
Date: Wed, 20 Aug 2014 18:43:12 +0100

 On 20/08/2014 16:35, Thomas Klausner wrote:
 > Can you take a look at these files?

 Hi
 I've looked, this issue is specific to OpenSSL & its build mechanism,
 I've not had issues with the limit subset of other components I've
 managed to build on AIX 7.1 honouring $CC

 Also, the native is xlc, referenced as the Darwin/Mac OS X version in
 compiler.mk.

State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 21 Aug 2014 08:03:41 +0000
State-Changed-Why:
I've committed the patch; I have however moved the chunk a few lines
lower, so it doesn't remove the libdl handling from the Darwin part
of the Makefile. Please confirm that this still works as intended!


From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49131 CVS commit: pkgsrc/security/openssl
Date: Thu, 21 Aug 2014 08:02:57 +0000

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Thu Aug 21 08:02:56 UTC 2014

 Modified Files:
 	pkgsrc/security/openssl: Makefile

 Log Message:
 On AIX, openssl ignores $CC & defaults to using the aix-cc profile
 & building with /usr/vac/bin/cc, add the necessary checks to Makefile
 to use the correct profile depending on what CC/ABI is set to.

 Patch from Sevan Janiyan in PR 49131, but moved a few lines to not
 affect Darwin.


 To generate a diff of this commit:
 cvs rdiff -u -r1.195 -r1.196 pkgsrc/security/openssl/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 21 Aug 2014 15:49:21 +0000
State-Changed-Why:
Second patch also committed, thanks for the feedback!


From: venture37 <venture37@geeklan.co.uk>
To: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, 
 pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org, wiz@NetBSD.org
Cc: 
Subject: Re: pkg/49131 (security/openssl utilise aix-$CC configuration profiles,
 rather than just assume cc)
Date: Thu, 21 Aug 2014 16:46:38 +0100

 On 21/08/2014 09:03, wiz@NetBSD.org wrote:
 > Please confirm that this still works as intended!


 With amended diff, confirmed every works as intended between GCC & XLC
 with ABI=64 & ABI not being defined. The correct configuration is
 selected, ABI=64 & gcc is broken but that's a separate issue.

 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/security/openssl/Makefile,v
 retrieving revision 1.196
 diff -u -r1.196 Makefile
 --- Makefile    21 Aug 2014 08:02:56 -0000      1.196
 +++ Makefile    21 Aug 2014 15:42:43 -0000
 @@ -94,13 +94,13 @@
  .if defined(ABI) && ${ABI} == "64"
  .if !empty(CC_VERSION:Mgcc*)
  CONFIGURE_ARGS+=       aix64-gcc
 -.elif
 +.else
  CONFIGURE_ARGS+=       aix64-cc
  .endif
  .else
  .if !empty(CC_VERSION:Mgcc*)
  CONFIGURE_ARGS+=       aix-gcc
 -.elif
 +.else
  CONFIGURE_ARGS+=       aix-cc
  .endif
  .endif

From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49131 CVS commit: pkgsrc/security/openssl
Date: Thu, 21 Aug 2014 15:48:52 +0000

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Thu Aug 21 15:48:52 UTC 2014

 Modified Files:
 	pkgsrc/security/openssl: Makefile

 Log Message:
 Fix typo in previous. From PR 49131.


 To generate a diff of this commit:
 cvs rdiff -u -r1.196 -r1.197 pkgsrc/security/openssl/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.