aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-multimedia/libmad/libmad/0001-configure-Respect-the-cflags-from-environment.patch
blob: 586782a348d295bf4295ebaca8feab266a029944 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 26342d1c775205f661f5cf005b7e054a04f5d32e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 16 May 2023 10:14:57 -0700
Subject: [PATCH] configure: Respect the cflags from environment

This is needed with OE like cross-build envs where certain important
flags maybe passed as global policy to aid cross compiling or
reproducibility etc.

Upstream-Status: Inappropriate [OE-Specific]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 configure.ac | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/configure.ac
+++ b/configure.ac
@@ -73,12 +73,9 @@ debug=""
 optimize=""
 profile=""
 
-set -- $CFLAGS
-CFLAGS=""
-
 if test "$GCC" = yes
 then
-    CFLAGS="-Wall"
+    CFLAGS="$CFLAGS -Wall"
 fi
 
 while test $# -gt 0
@@ -115,10 +112,13 @@ do
 	    optimize="$optimize $1"
 	    shift
 	    ;;
-	*)
+	-*)
 	    CFLAGS="$CFLAGS $1"
 	    shift
 	    ;;
+	*)
+	    shift
+	    ;;
     esac
 done