xref: /OK3568_Linux_fs/buildroot/package/zip/0002-configure-Don-t-use-host-CPP.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom fc5c889131ff6270e1028cc7edd87e7f10a7da6d Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Romain Naour <romain.naour@openwide.fr>
3*4882a593SmuzhiyunDate: Thu, 22 Jan 2015 15:21:31 +0100
4*4882a593SmuzhiyunSubject: [PATCH 2/6] configure: Don't use host CPP
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunCPP is redefined if a cpp binary (/lib/cpp) is found on the host.
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunUse the CPP="${CC} -E" allows to pass the following checks:
9*4882a593SmuzhiyunCheck if we can use asm code (for -DASMV)
10*4882a593SmuzhiyunCheck if compiler generates underlines (for -DASM_CRC)
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunSigned-off-by: Romain Naour <romain.naour@openwide.fr>
13*4882a593Smuzhiyun---
14*4882a593Smuzhiyun unix/configure | 7 -------
15*4882a593Smuzhiyun 1 file changed, 7 deletions(-)
16*4882a593Smuzhiyun
17*4882a593Smuzhiyundiff --git a/unix/configure b/unix/configure
18*4882a593Smuzhiyunindex 4185fee..489009f 100644
19*4882a593Smuzhiyun--- a/unix/configure
20*4882a593Smuzhiyun+++ b/unix/configure
21*4882a593Smuzhiyun@@ -122,13 +122,6 @@ fi
22*4882a593Smuzhiyun echo Check for the C preprocessor
23*4882a593Smuzhiyun # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp.
24*4882a593Smuzhiyun CPP="${CC} -E"
25*4882a593Smuzhiyun-# solaris as(1) needs -P, maybe others as well ?
26*4882a593Smuzhiyun-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
27*4882a593Smuzhiyun-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
28*4882a593Smuzhiyun-[ -f /lib/cpp ] && CPP=/lib/cpp
29*4882a593Smuzhiyun-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
30*4882a593Smuzhiyun-[ -f /xenix ] && CPP="${CC} -E"
31*4882a593Smuzhiyun-[ -f /lynx.os ] && CPP="${CC} -E"
32*4882a593Smuzhiyun
33*4882a593Smuzhiyun echo "#include <stdio.h>" > conftest.c
34*4882a593Smuzhiyun $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E"
35*4882a593Smuzhiyun--
36*4882a593Smuzhiyun1.9.3
37*4882a593Smuzhiyun
38