Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 1 | From 7a2729ee7f5d9b9d4a0d9b83fe641a2ab03c4ee0 Mon Sep 17 00:00:00 2001 |
| 2 | From: Joe Slater <joe.slater@windriver.com> |
| 3 | Date: Thu, 24 Feb 2022 17:36:59 -0800 |
| 4 | Subject: [PATCH 1/2] configure: use correct CPP |
| 5 | |
| 6 | configure uses CPP to test that two assembler routines |
| 7 | can be built. Unfortunately, it will use /usr/bin/cpp |
| 8 | if it exists, invalidating the tests. We use the $CC |
| 9 | passed to configure. |
| 10 | |
| 11 | Upstream-Status: Inappropriate [openembedded specific] |
| 12 | |
| 13 | Signed-off-by: Joe Slater <joe.slater@windriver.com> |
| 14 | --- |
| 15 | unix/configure | 15 +++++++++------ |
| 16 | 1 file changed, 9 insertions(+), 6 deletions(-) |
| 17 | |
| 18 | diff --git a/unix/configure b/unix/configure |
| 19 | index 73ba803..7e21070 100644 |
| 20 | --- a/unix/configure |
| 21 | +++ b/unix/configure |
| 22 | @@ -220,13 +220,16 @@ fi |
| 23 | echo Check for the C preprocessor |
| 24 | # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp. |
| 25 | CPP="${CC} -E" |
| 26 | + |
| 27 | +# We should not change CPP for yocto builds. |
| 28 | +# |
| 29 | # solaris as(1) needs -P, maybe others as well ? |
| 30 | -[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P" |
| 31 | -[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp |
| 32 | -[ -f /lib/cpp ] && CPP=/lib/cpp |
| 33 | -[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp |
| 34 | -[ -f /xenix ] && CPP="${CC} -E" |
| 35 | -[ -f /lynx.os ] && CPP="${CC} -E" |
| 36 | +# [ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P" |
| 37 | +# [ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp |
| 38 | +# [ -f /lib/cpp ] && CPP=/lib/cpp |
| 39 | +# [ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp |
| 40 | +# [ -f /xenix ] && CPP="${CC} -E" |
| 41 | +# [ -f /lynx.os ] && CPP="${CC} -E" |
| 42 | |
| 43 | echo "#include <stdio.h>" > conftest.c |
| 44 | $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E" |
| 45 | -- |
| 46 | 2.24.1 |
| 47 | |