From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id D75E73858D28 for ; Thu, 30 Dec 2021 15:55:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D75E73858D28 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-274-WE2eRJgpP7KOqA7symRq0Q-1; Thu, 30 Dec 2021 10:55:33 -0500 X-MC-Unique: WE2eRJgpP7KOqA7symRq0Q-1 Received: by mail-wr1-f70.google.com with SMTP id p1-20020adfba81000000b001a25b07ff53so6383340wrg.22 for ; Thu, 30 Dec 2021 07:55:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Hfgh2H4a3tcXtscD+EjLU2Y5ufDrPb8wB070hdAxhuI=; b=Y63tp+F+J0BMp8NHo5nzN+UGJjPe+XB/d6kxmZFVa8kF5TPVvACnq2fOLr7sqGnWlB dTcIaPjFcbIfVRE+L3igqkegZSSWC1ACqaNo9fiNzOZvnlTZvwvPqjORGAz40MAwji+v kaQc78E5pgSbuY353iq26FvwcdenXnHMBINQqVXI7EULz60rUaVsFqv7k1cI1gXh9zdj swL7fnLg5hF7vxZ7n6lFXhZKplGQhXR8LBWuFCi42GBP69uiSxpBZ6pPMaT28FhxCS8Y a3Y7hBMxPDL1zWGcRrZHAlZ6/Gy4qPFzAZefkB0VbZuucticcRR9k2M08IYqB+w6RMvU I2gQ== X-Gm-Message-State: AOAM530a/lVQbOCA/1GnImQJbvVzOCly/pgLQ9Zb3wOyjNfxq9LPCyEw 5RN7vZUt+sV9DDEjwcivYMu+RPzP2tUCZZSDFfXGnSqRPw9Y4WbJiIZWWaq0aVGEfxws6JGHb9j nAc5bNMdAZ7c= X-Received: by 2002:a05:600c:4e08:: with SMTP id b8mr26471623wmq.31.1640879731849; Thu, 30 Dec 2021 07:55:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYjUyhKkInWpQmyjM10/NS8WHSk066LLRkg3zLglUcCT/qEhdtXJ5OMLGEiy+2/O8X86sHBg== X-Received: by 2002:a05:600c:4e08:: with SMTP id b8mr26471611wmq.31.1640879731657; Thu, 30 Dec 2021 07:55:31 -0800 (PST) Received: from localhost (host86-134-238-138.range86-134.btcentralplus.com. [86.134.238.138]) by smtp.gmail.com with ESMTPSA id f6sm24798309wri.115.2021.12.30.07.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Dec 2021 07:55:31 -0800 (PST) Date: Thu, 30 Dec 2021 15:55:29 +0000 From: Andrew Burgess To: Andrea Monaco Cc: gdb@sourceware.org Subject: Re: -Werror enabled by default on GNU/Hurd Message-ID: <20211230155529.GC2308572@redhat.com> References: <87fsqbthf7.fsf@autistici.org> MIME-Version: 1.0 In-Reply-To: <87fsqbthf7.fsf@autistici.org> X-Operating-System: Linux/5.8.18-100.fc31.x86_64 (x86_64) X-Uptime: 15:45:53 up 12 days, 5:34, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2021 15:55:37 -0000 * Andrea Monaco via Gdb [2021-12-29 19:06:04 +0100]: > > > with this patch I am now able to build GDB on GNU/Hurd (i686). This > > might help you out. > > Thanks, that solves a warning. But the build still fails with this > output: > > > CXX msg_U.o > cc1: warning: command-line option '-Wno-mismatched-tags' is valid for C++/ObjC++ but not for C > cc1: warning: command-line option '-Wsuggest-override' is valid for C++/ObjC++ but not for C > cc1: warning: command-line option '-Wdeprecated-copy' is valid for C++/ObjC++ but not for C > cc1: warning: command-line option '-Wdeprecated-copy-dtor' is valid for C++/ObjC++ but not for C > cc1: warning: command-line option '-Wredundant-move' is valid for C++/ObjC++ but not for C > cc1: warning: command-line option '-Wstrict-null-sentinel' is valid for C++/ObjC++ but not for C > msg_U.c: In function 'msg_set_init_ports': > msg_U.c:1044:22: error: conversion from 'unsigned int' to 'short unsigned int' changes value from '4294967295' to '65535' [-Werror=overflow] > 1044 | /* msgtl_name = */ MACH_MSG_TYPE_POLYMORPHIC, > | ^~~~~~~~~~~~~~~~~~~~~~~~~ > msg_U.c: In function 'msg_set_dtable': > msg_U.c:1838:22: error: conversion from 'unsigned int' to 'short unsigned int' changes value from '4294967295' to '65535' [-Werror=overflow] > 1838 | /* msgtl_name = */ MACH_MSG_TYPE_POLYMORPHIC, > | ^~~~~~~~~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors > Makefile:1684: recipe for target 'msg_U.o' failed > make: *** [msg_U.o] Error 1 I don't claim to know anything about GNU/Hurd, this was the first time I ever installed it. The file msg_U.c is generated using the mig tool, and the .defs files binutils-gdb/gdb/msg.defs. The .defs file just includes /usr/include/hurd/msg.h. And the makefile fragment that builds the msg_U.c is found in binutils-gdb/gdb/config/i386/i386gnu.mn. I notice in the above, that my version of those two lines is slightly different, like this: /* msgtl_name = */ (unsigned short) MACH_MSG_TYPE_POLYMORPHIC, Which would solve the error you're seeing. Finally, here's the version number information for the mig tool I'm using: $ mig --version i686-gnu-mig (GNU MIG) 1.8+git20200618 Remembering that you probably understand all this far better than me, I wonder if you need to update your version of mig? As a last resort if you patch your generated file, adding the cast that I see, is this enough to finish building GDB? Clearly this isn't a long term solution, but it feels like the above warning is a tooling issue, rather than a problem with the GDB source. Thanks, Andrew