From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UK74NdZtoWDpNAAAgWs5BA (envelope-from ) for ; Sun, 16 May 2021 21:09:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sDp6MdZtoWCEDwAAbx9fmQ (envelope-from ) for ; Sun, 16 May 2021 19:09:10 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E12D814643 for ; Sun, 16 May 2021 21:09:09 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 97BC02903B; Sun, 16 May 2021 15:09:04 -0400 (EDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 6464E271EB for ; Sun, 16 May 2021 15:09:01 -0400 (EDT) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id C31A51B001AD; Sun, 16 May 2021 22:08:58 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1621192138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=V/WOXuJ1NKuLjtDM5uXvdeIzTNXhNDvYlrefESogOJU=; b=RXRCC4y+Cv/mvOOBt1k1yVP4mvMS37CQX2TKiMniZV0RgZjedZhodVBxEmIsb8Cjw3/W7V 4krEtQ1W25ZPJmcfFzi/tm2ZRp4pv53cWNeAU3wbgC30h95qrRuiG7ndFgLGOVEMsceZ+q cW3pWzRM7/ywQ9U9CJwy2SKviNPTTx/yX1RGtAY9lfCl+g8B5cqAQOQhFQqnPvNArLJEfX fF4Oz77E8ZUPPuZf77jaDPY3NFv2FsS12KDguzlfLHED1Pc3IwwiDQPSe/fegKzNzamSsf owHL+w/JjLuUlS/CwJaGn7hJlT0LPxY9sTx/O31ILGwHpG8Qyqgyljzl1GI3CQ== From: Tomi Ollila To: Felipe Contreras , David Bremner Subject: Re: ruby: building with CFLAGS="something" In-Reply-To: References: <87v97izwuk.fsf@tethera.net> User-Agent: Notmuch/0.32+21~gfdddd4c (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1621192138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=V/WOXuJ1NKuLjtDM5uXvdeIzTNXhNDvYlrefESogOJU=; b=dh3fdAuuJ6SpL/pvLNmFieiZzqlOe5Hb4y429oh24FKSfj0UQanqQ7W7Ualnvxdd7Qrs0S NF51rVhDUhiRMBAXIXFFRrDU/PNH+9EdYSCmivm1Cur/ryRmNm4RG9CXPv1kUBmoFYRmG2 pRtdJCriMkrdkTEAODTZFG4rNlD2cOWf+9q9JyI9UnNCbtNIfyJlMZoKArr3qkinm8mG+o 27mc7yF5F0SaoQvIL2TuD2j2k75MLXy6VkAkehISNRr4hPQ30eJouVL89y29Y+CqDcpki/ sjEY9ALJh/AifMKEijvV8aivc4x96piTSiFKswKxileQutZ5K5vwStVV6fiVNA== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1621192138; a=rsa-sha256; cv=none; b=c2iMohv8L06ZhHMnM5E52paPoRBW2qQ5eB1U4xkk5dvwBl8V7RPmdhisFoDKWIMqPo0oaE fj/1ZlbPYE6FMciK5Em2CYpW99H+Zyn/JhKs0ILyMwCHSo6bcyOThq0TVEy0smiv76/SbQ 5rUYGv+edplIxNIRilHrtidI0zhT0bydGxI0r78PSF8J7yAfMdNb5co5MiHOX+3yJ5+LJ1 1ZAOiOU7OSKRMNvdoEiwHVDEN8AqCO+DVRKqSthhM0chtivjBLr1xsvO0I359D82ZUuk9S Q0dymFA3F91AsBLLgEChD67zUMjwOqAr9CnT2cIQmSYdD3jyZIc2ItfRu1811Q== Message-ID-Hash: 5O5T3WYILOGKK3T7K3RSDTORCDLUCLZW X-Message-ID-Hash: 5O5T3WYILOGKK3T7K3RSDTORCDLUCLZW X-MailFrom: tomi.ollila@iki.fi X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: "notmuch@notmuchmail.org" X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621192150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=frqEVh/apnFKxugfl7U0EW2L/6taHWS2XxfEUf7gg+w=; b=S2OBrBUvd8MM4EAtcisbfuhwFTKDsg1fwuUW8sDMVv7V+kxcujD6VCQyOwTbuJMHSqSo+q KtRw0u+YISnA08svhZX7W4lg8hIVVSyRsNmt2YFVXJF6ZA9I7Fgj/MV1B82994rlCn//sB ACUJ8+f6wmDfnYK2V/RFtc/jAtTXwS26Bbd7c+/BkjwOL++zd/40oOyrrD3svimA5BNLBk 0JhBroUQ0jc7BSiY2yy/VeX98IimIFHl2ZUke3QZYgK3mF7TLxvxu3og6VLFpMC4LiXjx5 tCVnTgJ1fhWiO3pfFRHYtVaIkgI10AoBjx4uS77okeyHdM/2uLFaAK2r3odJzw== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1621192150; a=rsa-sha256; cv=fail; b=SmVrAn/O5obgAcc7vpwlRC6X9TRpxmoG8j4meqaLDrZI63AvJ+FGrhpyLR3zNrCBlcR02d KkopZt81NWptnEwasrC6/kv6KQoce4R+GqS2SWwV3J8XpU+xDt5DLLGfJzJKsq5YjoHIFs LYaslKiQdTyiXEGGsr299GjNjaLztSKaRzeJE2rRmifqC1uN82s2a7tJKK5O2LIA6DEy4n E+drHxy5LA/teK8/+fA4jL29yevMNdSozHp08zH92s3SeJ2YqncnrAM8Qcj2yHE6kgt1xG 8/TaO8vq0+NaNJDXZca/KH8mxNqSVBeZibHjNUxzu7HSd6YPe5RRDBgc+wAuhA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=RXRCC4y+; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 2.45 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=RXRCC4y+; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: E12D814643 X-Spam-Score: 2.45 X-Migadu-Scanner: scn0.migadu.com X-TUID: jJeyO6RenpTC On Sun, May 16 2021, Felipe Contreras wrote: > On Sun, May 16, 2021 at 7:28 AM David Bremner wrote: >> >> >> The rest of the (C and C++) codebase supports >> >> make CFLAGS="-g -O0" >> >> or >> >> CFLAGS="-g -O0" ./configure >> >> but the ruby bindings don't build: > > That's because -fPIC is needed. > > The way Ruby's mkmf generates the Makefile is wrong, because it should do: > > override CFLAGS+=-fPIC > > So that the user can specify other CFLAGS. > > However, we can fix that by doing that ourselves: > > --- a/bindings/Makefile.local > +++ b/bindings/Makefile.local > @@ -10,7 +10,7 @@ ifeq ($(HAVE_RUBY_DEV),1) > LIBNOTMUCH="../../lib/$(LINKER_NAME)" \ > NOTMUCH_SRCDIR='$(NOTMUCH_SRCDIR)' \ > $(RUBY) extconf.rb --vendor > - $(MAKE) -C $(dir)/ruby > + $(MAKE) -C $(dir)/ruby CFLAGS="$(CFLAGS) -pipe -fno-plt -fPIC" forget my suggestion -- also in general, usually, make variables have more "power" than defining such a thing in environment (would not be in those cases there is intermediate wrapper which does not get the make variable...) Tomi > endif > > We lose -march=x86-64 -mtune=generic (at least on my machine), but I > guess that's not a big deal since libnotmuch itself isn't getting > compiled with those. > > I'll send a patch soonish. > > -- > Felipe Contreras > _______________________________________________ > notmuch mailing list -- notmuch@notmuchmail.org > To unsubscribe send an email to notmuch-leave@notmuchmail.org