Codebase list ibutils / 2294070
Fix cross build ibutils fails to cross build from source, because it abuses AC_CHECK_FILE to discover includes. AC_CHECK_FILE is meant for discovering files on the host machine, but here it is being used for discovering files on the build machine. A simple test -f is better and makes ibutils cross buildable. Closes: #900673 Thanks: Helmut Grohne Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com> Benjamin Drung 3 years ago
2 changed file(s) with 42 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 Description: Fix cross build
1 ibutils fails to cross build from source, because it abuses
2 AC_CHECK_FILE to discover includes. AC_CHECK_FILE is meant for
3 discovering files on the host machine, but here it is being used for
4 discovering files on the build machine. A simple test -f is better and
5 makes ibutils cross buildable.
6 Bug-Debian: https://bugs.debian.org/900673
7
8 --- ibutils-1.5.7+0.2.gbd7e502.orig/ibis/config/osm.m4
9 +++ ibutils-1.5.7+0.2.gbd7e502/ibis/config/osm.m4
10 @@ -166,7 +166,7 @@
11
12
13 dnl validate the defined path - so the build id header is there
14 - AC_CHECK_FILE($osm_include_dir/opensm/osm_config.h,,
15 + AS_IF([test -f "$osm_include_dir/opensm/osm_config.h"],,
16 AC_MSG_ERROR([OSM: could not find $with_osm/include/opensm/osm_config.h]))
17
18 dnl now figure out somehow if the build was for debug or not
19 --- ibutils-1.5.7+0.2.gbd7e502.orig/config/osm.m4
20 +++ ibutils-1.5.7+0.2.gbd7e502/config/osm.m4
21 @@ -166,7 +166,7 @@
22
23
24 dnl validate the defined path - so the build id header is there
25 - AC_CHECK_FILE($osm_include_dir/opensm/osm_config.h,,
26 + AS_IF([test -f "$osm_include_dir/opensm/osm_config.h"],,
27 AC_MSG_ERROR([OSM: could not find $with_osm/include/opensm/osm_config.h]))
28
29 dnl now figure out somehow if the build was for debug or not
30 --- ibutils-1.5.7+0.2.gbd7e502.orig/ibmgtsim/config/osm.m4
31 +++ ibutils-1.5.7+0.2.gbd7e502/ibmgtsim/config/osm.m4
32 @@ -166,7 +166,7 @@
33
34
35 dnl validate the defined path - so the build id header is there
36 - AC_CHECK_FILE($osm_include_dir/opensm/osm_config.h,,
37 + AS_IF([test -f "$osm_include_dir/opensm/osm_config.h"],,
38 AC_MSG_ERROR([OSM: could not find $with_osm/include/opensm/osm_config.h]))
39
40 dnl now figure out somehow if the build was for debug or not
22 03-remove-rpath.patch
33 do_not_use_tmp.patch
44 makefile_dependencies.patch
5 cross.patch