On 06/07/2018 12:45 AM, mallapadi niranjan wrote:
Greetings, i am newbie trying to learn autoconf, I would like to autoconf to have build scripts created to compile assembly language programs written using GNU Assembler:
This is probably more a question for the automake list, since...
Below are my configurations configure:ac AC_INIT([hello], [0.01]]) AC_CONFIG_SRCDIR([hello.s]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([-Wall -Werror]) AC_CONFIG_FILES([Makefile]) AM_PROG_AS
...AM_PROG_AS is an automake macro, and...
AC_OUTPUT Makefile.am bin_PROGRAMS = hello hello_SOURCES = hello.s AM_CCAS = /usr/bin/as AM_CCASFLAGS = --gstabs+
...AM_CCAS is a variable for use by automake, not autoconf.
[ashok@mydevel foobar]$ make make all-am make[1]: Entering directory `/home/ashok/practice/ia32/myasm/autotools/foobar' gcc -g -O2 -o hello hello.o
According to the automake manual, AM_CCAS sets $CCAS to a default of $CC unless you define it to something else. However, I have no idea why $AM_CCASFLAGS doesn't seem to be honored in this line; you'll have to ask the automake developers for help in debugging it.
How do i override to use /usr/bin/as instead of gcc and pass -gstabs+ flag to /usr/bin/as.
The easiest way there, per documentation (although I have not tested), is to run './configure CCAS=/usr/bin/as' to force configure to use your choice of assembler in place of the default (since the automake documentation said the default would be $CC which is typically gcc on a GNU/Linux system).
-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf