From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Pretest compilation problem Date: Wed, 16 Feb 2011 09:22:40 -0500 Message-ID: <878vxgjbyn.fsf@stupidchicken.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297866181 11093 80.91.229.12 (16 Feb 2011 14:23:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 16 Feb 2011 14:23:01 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 16 15:22:57 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PpiHN-000450-BF for ged-emacs-devel@m.gmane.org; Wed, 16 Feb 2011 15:22:53 +0100 Original-Received: from localhost ([127.0.0.1]:44558 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpiHM-0002EH-R9 for ged-emacs-devel@m.gmane.org; Wed, 16 Feb 2011 09:22:52 -0500 Original-Received: from [140.186.70.92] (port=49868 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpiHI-0002E0-De for emacs-devel@gnu.org; Wed, 16 Feb 2011 09:22:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpiHH-0003L1-Bf for emacs-devel@gnu.org; Wed, 16 Feb 2011 09:22:48 -0500 Original-Received: from vm-emlprdomr-05.its.yale.edu ([130.132.50.146]:34621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpiHH-0003Ku-9w for emacs-devel@gnu.org; Wed, 16 Feb 2011 09:22:47 -0500 Original-Received: from furball (dhcp128036226132.central.yale.edu [128.36.226.132]) (authenticated bits=0) by vm-emlprdomr-05.its.yale.edu (8.14.4/8.14.4) with ESMTP id p1GEMfSV029716 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 16 Feb 2011 09:22:42 -0500 Original-Received: by furball (Postfix, from userid 1000) id B44641605EC; Wed, 16 Feb 2011 09:22:40 -0500 (EST) In-Reply-To: (Nelson H. F. Beebe's message of "Tue, 15 Feb 2011 18:34:01 -0700 (MST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.146 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.132.50.146 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:136099 Archived-At: I got an email from Nelson Beebe about a problem compiling a 32-bit version on a 64-bit x64 machine: > gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H > -I. -I/local/build32/gcc/emacs-23.2.94/src -D_BSD_SOURCE -m32 > -I/usr/local/include -MMD -MF deps/prefix-args.d > prefix-args.c > gcc -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-znocombreloc > prefix-args.o -o prefix-args > /home/local/bin/../lib/gcc-lib/x86_64-unknown-linux-gnu/3.3.5/../../../../x86_64-unknown-linux-gnu/bin/ld: > i386 architecture of input file `prefix-args.o' is > incompatible with i386:x86-64 output > > The problem is in src/Makefile:137: > > $(CC) $(LDFLAGS) prefix-args.o -o prefix-args > > In general, $(CC) should ALWAYS have a $(CFLAGS) following it; > otherwise, architecture-specific > flags like -m32 fail to be supplied. Adding $(CFLAGS) sounds correct, except for a comment about this rule in Makefile.in, which I don't understand: /* We do not use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE often contain options that have to do with using Emacs''s crt0, which are only good with temacs. */ prefix-args${EXEEXT}: prefix-args.o $(config_h) $(CC) $(LDFLAGS) prefix-args.o -o prefix-args Does anyone know what this warning is about, and whether adding $(CFLAGS) (or $(ALL_CFLAGS)?) could cause problems here?