NetBSD Problem Report #53762

From www@NetBSD.org  Wed Dec  5 19:03:55 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 0D9457A1A5
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  5 Dec 2018 19:03:55 +0000 (UTC)
Message-Id: <20181205190354.274517A218@mollari.NetBSD.org>
Date: Wed,  5 Dec 2018 19:03:54 +0000 (UTC)
From: veprbl@gmail.com
Reply-To: veprbl@gmail.com
To: gnats-bugs@NetBSD.org
Subject: tradcpp doesn't propagate __aarch64__
X-Send-Pr-Version: www-1.0

>Number:         53762
>Category:       pkg
>Synopsis:       tradcpp doesn't propagate __aarch64__
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dholland
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 05 19:05:00 +0000 2018
>Last-Modified:  Thu Dec 06 17:10:00 +0000 2018
>Originator:     Dmitry Kalinkin
>Release:        
>Organization:
>Environment:
aarch64-linux
>Description:
The title says it all. This breaks imake support of AArch64 because they detect it in a following way (from xorg-cf-files-1.0.6/lib/X11/config/Imake.cf):

# if defined(__aarch64__)
#   define AArch64Architecture
#   undef __aarch64__
# endif

I apologise if I'm reporting the bug incorrectly, I was directed here from this page: ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/tradcpp/README.html
>How-To-Repeat:
I don't run any machine with aarch64, but I imagine it would be along the lines of:

cat > test.c <<EOF
#ifndef __aarch64__
#error "Oh no!"
#endif
>Fix:
diff a/config.h b/config.h
--- a/config.h
+++ b/config.h
@@ -124,6 +124,8 @@
 #define CONFIG_CPU "__ppc64__"
 #elif defined(__ARM__)
 #define CONFIG_CPU "__ARM__"
+#elif defined(__aarch64__)
+#define CONFIG_CPU "__aarch64__"
 #else
 /* let it go */
 #endif

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: bin-bug-people->dholland
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Thu, 06 Dec 2018 09:10:12 +0000
Responsible-Changed-Why:
Over to author


From: Leonardo Taccari <leot@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/53762: tradcpp doesn't propagate __aarch64__
Date: Thu, 06 Dec 2018 10:16:30 +0100

 Hello Dmitry,

 veprbl@gmail.com writes:
 > >Number:         53762
 > >Category:       bin
 > >Synopsis:       tradcpp doesn't propagate __aarch64__
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    bin-bug-people
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Wed Dec 05 19:05:00 +0000 2018
 > >Originator:     Dmitry Kalinkin
 > >Release:        =

 > >Organization:
 > >Environment:
 > aarch64-linux
 > >Description:
 > The title says it all. This breaks imake support of AArch64 because they=
  detect it in a following way (from xorg-cf-files-1.0.6/lib/X11/config/Ima=
 ke.cf):
 >
 > # if defined(__aarch64__)
 > #   define AArch64Architecture
 > #   undef __aarch64__
 > # endif
 >
 > I apologise if I'm reporting the bug incorrectly, I was directed here fr=
 om this page: ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/tradcpp=
 /README.html

 At least on NetBSD it build and runs fine on aarch64 (at least to
 build x11/unclutter).  And maybe that explain why:

  % gcc -dM -E - < /dev/null | grep __aarch64__
  #define __aarch64__ 1

 (But probably the CONFIG_CPU macro is not defined and so if it is
 consumed by tradcpp it would be probably good to apply it!)

From: Dima <veprbl@gmail.com>
To: gnats-bugs@netbsd.org
Cc: dholland@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: bin/53762: tradcpp doesn't propagate __aarch64__
Date: Thu, 6 Dec 2018 12:06:13 -0500

 Dec 6 2018 04:35, Leonardo Taccari <leot@netbsd.org>:
 >
 >  At least on NetBSD it build and runs fine on aarch64 (at least to
 >  build x11/unclutter).
 The original report [1] mentioned breakage of x11-ssh-askpass.
 >  And maybe that explain why:
 >
 >   % gcc -dM -E - < /dev/null | grep __aarch64__
 >   #define __aarch64__ 1
 I believe the problem is that tradcpp will not define the same macro
 even if cpp from gcc does.

 Best regards,
 Dmitry

 [1] https://github.com/NixOS/nixpkgs/pull/51578

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.