#173 ✓resolved
Peter Johnson

$CFLAGS are not being used by all components

Reported by Peter Johnson | June 25th, 2011 @ 07:51 PM

Originally posted on Trac by anonymous
Original Trac Ticket

  Description

gcc -std=gnu99 -I. -c -o genperf.o test -f tools/genperf/genperf.c || echo './'tools/genperf/genperf.c

This is where it fails when I do a "make" after a successful "configure". Where are my $CFLAGS? I don't see them. My $CFLAGS are set to:

-isysroot /Developer/Xcode?/SDKs/MacOSX10.5.sdk

If I add them manually

gcc -isysroot /Developer/Xcode?/SDKs/MacOSX10.5.sdk -std=gnu99 -I. -c -o genperf.o test -f tools/genperf/genperf.c || echo './'tools/genperf/genperf.c

It compiles just fine. So why do none of the tools in the "tools" directory use my CFLAGS? They are found in the Makefile of the root yasm folder, but not in the Makefiles anywhere else.

Trac Attachments

h3. Trac Comments
comment:1

              Changed 20 months ago by peter@tortall.net


This is because the executables created in the "tools" directory are run locally.  They can't use the same CFLAGS as used for building yasm itself to support cross-building (as otherwise the built tools might not be able to run on the local system).  However, in the current tree I am indeed lacking a variable to support specifying unique CFLAGS for the build system; I will add this (calling it something like LOCAL_CFLAGS) but in the meantime you can use the INCLUDES variable.

comment:2

              Changed 20 months ago by peter


(In [2234]) Fix #187: Add new variable CFLAGS_FOR_BUILD for CC_FOR_BUILD compiles.

Due to the need to support cross-building, CC_FOR_BUILD is used instead of
CC for tools that will be run as part of the build process.  However, it
is sometimes necessary to add custom CFLAGS for these builds; CFLAGS_FOR_BUILD
supports this cleanly.

      comment:2

                  Changed 20 months ago by peter

      Status
        changed from new to closed
    
      Resolution
        set to fixed

(In [2234]) Fix #187: Add new variable CFLAGS_FOR_BUILD for CC_FOR_BUILD compiles.

Due to the need to support cross-building, CC_FOR_BUILD is used instead of
CC for tools that will be run as part of the build process.  However, it
is sometimes necessary to add custom CFLAGS for these builds; CFLAGS_FOR_BUILD
supports this cleanly.

      Status
        changed from new to closed
    
      Resolution
        set to fixed

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Yasm Modular Assembler Project

Shared Ticket Bins

People watching this ticket

Pages