<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello,<br>
    <br>
    I am trying to build a very simple library.<br>
    That library has a Makefile and  the correct way to build it on
    Illumos would be to do this:<br>
    <br>
    CC=gcc make library<br>
    <br>
    So I wrote a Makefile for a oi-userland package with the following
    in it:<br>
    <br>
      COMPILER= gcc<br>
    <br>
    <blockquote type="cite">include $(WS_MAKE_RULES)/prep.mk<br>
      include $(WS_MAKE_RULES)/justmake.mk<br>
      include $(WS_MAKE_RULES)/ips.mk</blockquote>
    <br>
    However, gmake build fails:<br>
    <br>
    <blockquote type="cite">symlink cloning
      /root/oi-userland/components/library/http-parser/http-parser-2.1
      to /root/oi-userland/components/library/http-parser/build/i86<br>
      (cd /root/oi-userland/components/library/http-parser/build/i86;
      /usr/bin/env LD_OPTIONS="-M /usr/lib/ld/map.noexstk -M
      /usr/lib/ld/map.noexdata -M /usr/lib/ld/map.pagealign -Bdirect -z
      ignore" LD_EXEC_OPTIONS="-z aslr=disable" CCACHE="/usr/bin/ccache"
      <u>CC_gcc_32</u>="/usr/gcc/4.9/bin/gcc"
      CC_gcc_64="/usr/gcc/4.9/bin/gcc" CXX_gcc_32="/usr/gcc/4.9/bin/g++"
      CXX_gcc_64="/usr/gcc/4.9/bin/g++"
      CCACHE_BASEDIR="/root/oi-userland/components/library/http-parser/build/i86"
      /usr/gnu/bin/make  library)<br>
      make[1]: Entering directory
      '/root/oi-userland/components/library/http-parser/build/i86'<br>
      <u>cc</u> -I. -DHTTP_PARSER_STRICT=0  -Wall -Wextra -Werror -O3 
      -fPIC -c http_parser.c -o libhttp_parser.o<br>
      cc: -W option with unknown program all<br>
    </blockquote>
    <br>
    So it is clear that it makes use of the "COMPILER" variable,
    otherwise it would not have had "CC_gcc_32" in the messages.
    However, it looks like it does not pass CC variable to the Makefile
    it eventually calls, so that Makefile is using the default (and
    incompatible) compiler.<br>
    <br>
    Please can you suggest something?<br>
    <br>
    With kind regards,<br>
    Denys Rtveliashvili<br>
  </body>
</html>