Unix Makefile: Rework the assignment of CXX and AS
[openssl.git] / Configurations / unix-Makefile.tmpl
index 2a4d2df332ee3a0f5e0d3c421b7e227a7ef6b779..a7ec6a15e2a941b6dc408f08216d471ee63140e4 100644 (file)
@@ -191,7 +191,7 @@ CPPFLAGS={- our $cppflags = join(" ",
 CPPFLAGS_Q={- $cppflags =~ s|([\\"])|\\$1|g; $cppflags -}
 CC= $(CROSS_COMPILE){- $config{cc} -}
 CFLAGS={- join(' ', @{$config{cflags}}) -}
-CXX= $(CROSS_COMPILE){- $config{cxx} -}
+CXX={- $config{cxx} ? "\$(CROSS_COMPILE)$config{cxx}" : '' -}
 CXXFLAGS={- join(' ', @{$config{cxxflags}}) -}
 LDFLAGS= {- join(' ', @{$config{lflags}}) -}
 PLIB_LDFLAGS= {- join(' ', @{$config{plib_lflags}}) -}
@@ -236,7 +236,7 @@ TARFILE=        ../$(NAME).tar
 # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
 # gcc, then the driver will automatically translate it to -xarch=v8plus
 # and pass it down to assembler.
-AS={- $config{as} || '$(CC) -c' -}
+AS={- $config{as} ? "\$(CROSS_COMPILE)$config{as}" : '$(CC) -c' -}
 ASFLAGS={- join(' ', @{$config{asflags}}) || '$(CFLAGS)' -}
 PERLASM_SCHEME= {- $target{perlasm_scheme} -}