From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id A43611B00063 for ; Fri, 21 Oct 2016 21:16:27 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id D979BB5D891 for ; Fri, 21 Oct 2016 21:47:38 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 73F3218CC7B5 for ; Fri, 21 Oct 2016 21:47:39 +0900 (JST) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 9B8CB120472; Fri, 21 Oct 2016 21:47:37 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id DCB901203F8 for ; Fri, 21 Oct 2016 21:47:33 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=anBZPknth9QBiyyrP0u7S7sVbks=; b=NmtttDP27gIAO266y7 +xxW7sWy4WXqaqczt2S1o0ZuVWyzaH4EY6Q/+qqHpwGdixDEj4YvLbAReRvT9Vou JCSM+AX2I3dSDpKjWhD+0if2QlWMuu5L8IaTjxexjfFA1TZMp3ve789IzyjWKTU8 EMJwNlsG8pnSh3rPTsDgghBaA= Received: by filter0807p1mdw1.sendgrid.net with SMTP id filter0807p1mdw1-29255-580A0E49-66 2016-10-21 12:47:05.719431108 +0000 UTC Received: from herokuapp.com (ec2-54-242-49-179.compute-1.amazonaws.com [54.242.49.179]) by ismtpd0002p1iad1.sendgrid.net (SG) with ESMTP id m--oE03-TUm1DpRhfRI19g for ; Fri, 21 Oct 2016 12:47:05.781 +0000 (UTC) Date: Fri, 21 Oct 2016 12:47:05 +0000 From: v.ondruch@tiscali.cz To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 52551 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11863 X-Redmine-Issue-Author: luizluca X-Redmine-Sender: vo.x X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS5ncOASNObr6u2DSKkGi2MyS3QB1h/y8TBKvk vtflkdJGIJcf77Uh2MSzVmY+gW5aa2VQaLRXe+yR3vZ/ruPf3Xwolph+Hr4+MIFDMrSBWv2XCF6Rj6 K0X6W5NZfBNfhIQGzrX/jk+K+C9F4fR4ycnh1o2EbTf+w3Kxl3VCmbXw/w== X-ML-Name: ruby-core X-Mail-Count: 77698 Subject: [ruby-core:77698] [Ruby trunk Bug#11863] configure/makefile needs to follow the standard behavior X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11863 has been updated by Vit Ondruch. Ping? What this the state. Now I noticed that the LDFLAGS are not used during build of Fedora package, so Ruby is not properly hardened as it should be. That is unexpected :/ ---------------------------------------- Bug #11863: configure/makefile needs to follow the standard behavior https://bugs.ruby-lang.org/issues/11863#change-60980 * Author: Luiz Angelo Daros de Luca * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.2.4p230 (2015-12-16 revision 53155) [i486-linux-gnu] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- Hello, I'm the current OpenWRT maintainer of ruby packages. However, configure/makefile for ruby has some exotic usages. LDFLAGS is used only for execs DLDFLAGS for libraries XLDFLAGS for extra options for both. Normally, it is expected that LDFLAGS applies to all linked code. If ruby needs something special for each case, I guess the extra ?LDFLAGS should append to what LDFLAGS defines (and in Makefile). DLDFLAGS is a special confusion. It is an accepted configure VAR. However, that really defines DLDFLAGS in Makefile is not DLDFLAGS but LIBRUBY_DLDFLAGS. At first, LIBRUBY_DLDFLAGS uses DLDFLAGS to define its initial value. However, for some targets, it is simply overwritten (i.e.: for linux). XLDFLAGS also has this problem of not respecting what was defined. However, reading the code, this happens only for AIX. I wasn't hit by this bug. I noticed in some places that some configure vars include other vars as value. Ex: darwin*) : ... LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "' $(XLDFLAGS)' Normally all vars should include only new arguments. The job of merging VAR values should be done in Makefile. This happens for most of vars, but not for some cases like LIBRUBY_DLDFLAGS. Specially for this example, LIBRUBY_DLDFLAGS is only used to define DLDFLAGS in Makefile and it DOES already include XLDFLAGS there. Appending var values with another var both in configure and makefile makes the build debugging a lot harder, specially if it changes the var names. What would be expected by configure/makefile: 1) standard vars like CFLAGS, LDFLAGS, etc should be respected for all compiled/linked code. 2) all accepted env var defined for configure should not be replaced internally by ./configure but only appended. 3) var XYZ defined in configure should be the one that defines var XYZ in Makefile. Extra opts not appended should come from an extra var. 4) var XYZ should not include the value of another var ABC in configure. Do it in Makefile. -- https://bugs.ruby-lang.org/