[ Sorry for taking so long to reply to this. I wanted to give this report
  the reply that it deserves, and such reply was not a short one ].

Of course, I fully agree that hello should cross-compile, as it's made
with autoconf and it will be a good example for other autoconfiscated
packages to follow.

There is a paragraph in policy which is to blame (sort-of) for the
explicit use of CC in hello, namely this:

  For the C programming language, this means the following compilation
  parameters should be used:

          CC = gcc
          CFLAGS = -O2 -g -Wall # sane warning options vary between programs
          LDFLAGS = # none
          INSTALL = install -s # (or use strip on the files in debian/tmp)


So: Should we change policy as well?

On one hand, setting CC=gcc makes debian source packages to build on
non-linux systems nearly out-of-the-box, provided gcc is installed.

I agree that this is a very marginal benefit for us, but I consider it
to be a nice thing.

In fact, a long time ago, I heard about some unix sysadmins that told
me that whenever thay wanted to have a free program in their unix
workstations, they retrieved directly the debian source as the first
try, not the author's version! Debian "purifies" the source and makes it
to be portable and error-free from build errors, they said.


On the other hand, one of the things ./configure usually do is to
check for gcc and use it if it's available, so this very little
marginal benefit does not really count for packages made with autoconf.


In diffutils, for example, I did this when I was asked to support
cross-compilation:

CC = gcc
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
  CC=$(DEB_HOST_GNU_TYPE)-gcc
endif


If I have to remove CC=gcc from hello, I would like to see a policy change
that "supports" this change.

Or, alternatively, I could modify hello in the same way I did for diffutils.


Which route do you think we should follow?


Thanks.



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to