diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2008-09-13 21:06:39 +0000 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2008-09-13 21:06:39 +0000 |
commit | 5d35f52a22e70d50f1318de9bc11f9dbc85120e0 (patch) | |
tree | 23047e444dbfa74ba1c57aeb57de51f04d4194cb /patches/ltp-full-20080831 | |
parent | e0e0bd0379424bc54923a73ac2f89e607c8d4ae5 (diff) | |
download | ptxdist-5d35f52a22e70d50f1318de9bc11f9dbc85120e0.tar.gz ptxdist-5d35f52a22e70d50f1318de9bc11f9dbc85120e0.tar.xz |
* ltp-full: fix open_posix_testsuite to allow cross compilation
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@8839 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'patches/ltp-full-20080831')
-rw-r--r-- | patches/ltp-full-20080831/generic/no-libmqueue.diff | 30 | ||||
-rw-r--r-- | patches/ltp-full-20080831/generic/no-libposix1b.diff | 36 | ||||
-rw-r--r-- | patches/ltp-full-20080831/generic/series | 3 | ||||
-rw-r--r-- | patches/ltp-full-20080831/generic/use-right-compiler.diff | 59 |
4 files changed, 128 insertions, 0 deletions
diff --git a/patches/ltp-full-20080831/generic/no-libmqueue.diff b/patches/ltp-full-20080831/generic/no-libmqueue.diff new file mode 100644 index 000000000..1fd45a07d --- /dev/null +++ b/patches/ltp-full-20080831/generic/no-libmqueue.diff @@ -0,0 +1,30 @@ +Subject: [PATCH ltp-full-20080831] don't use libmqueue +From: Robert Schwebel <r.schwebel@pengutronix.de> + +The Makefile in the mqueues directory of the open_posix_testsuite wants +to link the mq_open testcase against libmqueue. POSIX.1-2001 states: + +"Link with -lrt". + +So this is definitely wrong, and we do what the standard recommends. + +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> + +--- + testcases/open_posix_testsuite/stress/mqueues/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: ltp-full-20080831/testcases/open_posix_testsuite/stress/mqueues/Makefile +=================================================================== +--- ltp-full-20080831.orig/testcases/open_posix_testsuite/stress/mqueues/Makefile ++++ ltp-full-20080831/testcases/open_posix_testsuite/stress/mqueues/Makefile +@@ -1,7 +1,7 @@ + INCLUDE = -I../../include +-LIB=-lmqueue ++LIB=-lrt + +-CFLAGS=-Wall -O2 -g -lpthread ++CFLAGS=-Wall -O2 -g + + all: multi_send_rev_1.test multi_send_rev_2.test + diff --git a/patches/ltp-full-20080831/generic/no-libposix1b.diff b/patches/ltp-full-20080831/generic/no-libposix1b.diff new file mode 100644 index 000000000..ccced039d --- /dev/null +++ b/patches/ltp-full-20080831/generic/no-libposix1b.diff @@ -0,0 +1,36 @@ +Subject: [PATCH ltp-full-20080831] don't use libposix1b +From: Robert Schwebel <r.schwebel@pengutronix.de> + +The semaphores tests of the open_posix_testsuite want to link again +libposix1b, but I don't have any idea why it tries to do so. However, it +results in: + +gcc -Wall -O2 -g -I -L/usr/lib -I../../include multi_con_pro.c -o multi_con_pro.test -lposix1b -lpthread +/usr/bin/ld: cannot find -lposix1b + +This patch removes the bogus library. + +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> + +--- + testcases/open_posix_testsuite/stress/semaphores/Makefile | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +Index: ltp-full-20080831/testcases/open_posix_testsuite/stress/semaphores/Makefile +=================================================================== +--- ltp-full-20080831.orig/testcases/open_posix_testsuite/stress/semaphores/Makefile ++++ ltp-full-20080831/testcases/open_posix_testsuite/stress/semaphores/Makefile +@@ -1,12 +1,11 @@ + INCLUDE = -I../../include +-LIB=-lposix1b + + CFLAGS=-Wall -O2 -g + + all: multi_con_pro.test + + %.test : %.c +- $(CC) $(CFLAGS) $(INCLUDE) $< -o $@ $(LIB) -lpthread ++ $(CC) $(CFLAGS) $(INCLUDE) $< -o $@ -lpthread + clean: + rm *.test + diff --git a/patches/ltp-full-20080831/generic/series b/patches/ltp-full-20080831/generic/series new file mode 100644 index 000000000..7cb72c574 --- /dev/null +++ b/patches/ltp-full-20080831/generic/series @@ -0,0 +1,3 @@ +use-right-compiler.diff +no-libmqueue.diff +no-libposix1b.diff diff --git a/patches/ltp-full-20080831/generic/use-right-compiler.diff b/patches/ltp-full-20080831/generic/use-right-compiler.diff new file mode 100644 index 000000000..fd6133482 --- /dev/null +++ b/patches/ltp-full-20080831/generic/use-right-compiler.diff @@ -0,0 +1,59 @@ +Subject: [PATCH ltp-full-20080831] +From: Robert Schwebel <r.schwebel@pengutronix.de> + +The Makefile in the mqueues- and semaphores directory of the +open_posix_testsuite try incorrectly to overwrite the compiler and have +no clue about the fact that there could be a cross compilation scenario, +so it tries to search libs in /usr/lib. This results in the following +command line: + +make[2]: Entering directory `<somewhere>/ltp-full-20080831/testcases/open_posix_testsuite/stress/mqueues' +gcc -Wall -O2 -g -I -L/usr/lib -lpthread -I../../include multi_send_rev_1.c -o multi_send_rev_1.test -lmqueue + +which is obviously wrong for cross compilation. With this change the +right compiler and the right libs from the toolchain are being used. + +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> + +--- + testcases/open_posix_testsuite/stress/mqueues/Makefile | 8 +------- + testcases/open_posix_testsuite/stress/semaphores/Makefile | 7 +------ + 2 files changed, 2 insertions(+), 13 deletions(-) + +Index: ltp-full-20080831/testcases/open_posix_testsuite/stress/mqueues/Makefile +=================================================================== +--- ltp-full-20080831.orig/testcases/open_posix_testsuite/stress/mqueues/Makefile ++++ ltp-full-20080831/testcases/open_posix_testsuite/stress/mqueues/Makefile +@@ -1,13 +1,7 @@ +- +-ifndef POSIX_DIR_LIB +- POSIX_DIR_LIB=/usr/lib +-endif +- + INCLUDE = -I../../include + LIB=-lmqueue + +-CC=gcc +-CFLAGS=-Wall -O2 -g -I$(POSIX_DIR_INC) -L$(POSIX_DIR_LIB) -lpthread ++CFLAGS=-Wall -O2 -g -lpthread + + all: multi_send_rev_1.test multi_send_rev_2.test + +Index: ltp-full-20080831/testcases/open_posix_testsuite/stress/semaphores/Makefile +=================================================================== +--- ltp-full-20080831.orig/testcases/open_posix_testsuite/stress/semaphores/Makefile ++++ ltp-full-20080831/testcases/open_posix_testsuite/stress/semaphores/Makefile +@@ -1,12 +1,7 @@ +-ifndef POSIX_DIR_LIB +- POSIX_DIR_LIB=/usr/lib +-endif +- + INCLUDE = -I../../include + LIB=-lposix1b + +-CC=gcc +-CFLAGS=-Wall -O2 -g -I$(POSIX_DIR_INC) -L$(POSIX_DIR_LIB) ++CFLAGS=-Wall -O2 -g + + all: multi_con_pro.test + |