GNU bug report logs - #25350
Automake does not override CC.

Previous Next

Package: automake;

Reported by: MrUmunhum <at> CruzIO.com

Date: Wed, 4 Jan 2017 02:57:01 UTC

Severity: normal

Tags: notabug

Done: Mathieu Lirzin <mthl <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25350 in the body.
You can then email your comments to 25350 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#25350; Package automake. (Wed, 04 Jan 2017 02:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to MrUmunhum <at> CruzIO.com:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Wed, 04 Jan 2017 02:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "william estrada" <MrUmunhum <at> CruzIO.com>
To: bug-automake <at> gnu.org
Subject: Automake does not override CC.
Date: Tue, 3 Jan 2017 18:06:12 -0800
Hello,
I have a Makefile.am that creates a Makefile that does 3 compiles, one for
each target CPU.
 # src/event/Makefile.am
AM_LDLAGS  = --Pedantic -Wall -Std=C99 -O2
bin_PROGRAMS =
include x64.am
include arm.am
include i686.am
---------------------------------------
# src/event/x64.am
bin_PROGRAMS      += event_x64
event_x64_SOURCES  =  event.c
event_x64_CFLAGS   = -m64
---------------------------------------
# src/event/i686.am
bin_PROGRAMS       += event_i686
event_i686_SOURCES  =  event.c
event_i686_CFLAGS   = -m32
---------------------------------------
# src/event/arm.am
bin_PROGRAMS      += event_arm
event_arm_SOURCES  =  event.c
event_arm_CFLAGS   = -DARM
event_arm_CC       =  arm-linux-gnu-gcc
AM_CC              =  arm-linux-gnu-gcc

My problem is my gcc on my Fedora 23 does not support the '-marm', so I
need to change the CC flag.
Using event_arm_CC or AM_CC does not work.

How to change the compiler?

-- 
William Estrada
Mt Umunhum, CA, USA, Earth
HTTP:// Mt-Umunhum-Wireless.net
Skype: MrUmunhum





Information forwarded to bug-automake <at> gnu.org:
bug#25350; Package automake. (Sun, 18 Jun 2017 00:04:01 GMT) Full text and rfc822 format available.

Message #8 received at 25350 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Lirzin <mthl <at> gnu.org>
To: "william estrada" <MrUmunhum <at> CruzIO.com>
Cc: debbugs <control <at> debbugs.gnu.org>, 25350 <at> debbugs.gnu.org
Subject: Re: bug#25350: Automake does not override CC.
Date: Sun, 18 Jun 2017 02:03:03 +0200
tags 25350 notabug
close 25350
thanks

Hello William,

"william estrada" <MrUmunhum <at> CruzIO.com> writes:

> I have a Makefile.am that creates a Makefile that does 3 compiles, one for
> each target CPU.
>  # src/event/Makefile.am
> AM_LDLAGS  = --Pedantic -Wall -Std=C99 -O2
> bin_PROGRAMS =
> include x64.am
> include arm.am
> include i686.am
> ---------------------------------------
> # src/event/x64.am
> bin_PROGRAMS      += event_x64
> event_x64_SOURCES  =  event.c
> event_x64_CFLAGS   = -m64
> ---------------------------------------
> # src/event/i686.am
> bin_PROGRAMS       += event_i686
> event_i686_SOURCES  =  event.c
> event_i686_CFLAGS   = -m32
> ---------------------------------------
> # src/event/arm.am
> bin_PROGRAMS      += event_arm
> event_arm_SOURCES  =  event.c
> event_arm_CFLAGS   = -DARM
> event_arm_CC       =  arm-linux-gnu-gcc
> AM_CC              =  arm-linux-gnu-gcc
>
> My problem is my gcc on my Fedora 23 does not support the '-marm', so I
> need to change the CC flag.
> Using event_arm_CC or AM_CC does not work.
>
> How to change the compiler?

I don't any experience with cross compilation, but AIUI what you try
to achieve doesn't fit in the Autotools model.

What you have to do is to provide a generic build instruction:

--8<---------------cut here---------------start------------->8---
bin_PROGRAMS = event
event_SOURCES = event.c
--8<---------------cut here---------------end--------------->8---

Then when running './configure' you have to define the "--build",
"--host", and "--target" options according to the architecture you want
compile [1][2].  If you want to automate this process for multiple
architectures, you have to create a script running './configure ... &&
make' multiples times

I am closing this bug.  If you have questions regarding cross
compilation with Automake feel free to ask them on <automake <at> gnu.org>.

Thanks.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37

[1] https://www.gnu.org/software/automake/manual/automake.html#Cross_002dCompilation
[2] https://www.gnu.org/software/autoconf/manual/autoconf.html#Specifying-Names




Added tag(s) notabug. Request was from Mathieu Lirzin <mthl <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 18 Jun 2017 00:04:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 25350 <at> debbugs.gnu.org and MrUmunhum <at> CruzIO.com Request was from Mathieu Lirzin <mthl <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 18 Jun 2017 00:04:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 16 Jul 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 341 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.