From: Chong Yidong <cyd@stupidchicken.com>
To: emacs-devel@gnu.org
Subject: Pretest compilation problem
Date: Wed, 16 Feb 2011 09:22:40 -0500 [thread overview]
Message-ID: <878vxgjbyn.fsf@stupidchicken.com> (raw)
In-Reply-To: <CMM.0.94.0.1297820041.beebe@psi.math.utah.edu> (Nelson H. F. Beebe's message of "Tue, 15 Feb 2011 18:34:01 -0700 (MST)")
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?
next parent reply other threads:[~2011-02-16 14:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CMM.0.94.0.1297820041.beebe@psi.math.utah.edu>
2011-02-16 14:22 ` Chong Yidong [this message]
2011-02-16 15:32 ` Pretest compilation problem Andreas Schwab
2011-02-17 3:16 ` CC, CFLAGS, and -m32 [was Re: Pretest compilation problem] Glenn Morris
2011-02-17 17:28 ` Paul Eggert
2011-02-19 17:39 ` Chong Yidong
2011-02-19 18:14 ` Paul Eggert
2011-02-17 22:57 ` Miles Bader
2011-02-16 19:11 ` Pretest compilation problem Glenn Morris
2011-02-16 22:22 ` Andreas Schwab
2011-02-17 1:40 ` Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878vxgjbyn.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.