]> granicus.if.org Git - esp-idf/commitdiff
Fix build with macports/pkgconfig, silence format string warnings on OS X
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 7 Nov 2016 04:27:53 +0000 (12:27 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Mon, 7 Nov 2016 04:27:53 +0000 (12:27 +0800)
Extra space is needed in echo -n "-lncurses ", otherwise if pkg-config outputs a directory after that, it will result in "-lncurses-L/opt/local/lib" (without space).
-Wno-format-security flag is needed on macOS to silence warnings about printf(gettext("message")) constructs.

tools/kconfig/lxdialog/check-lxdialog.sh

index 48c19278a925ad4ff19c09f43563a44287fa26db..79df5ed4f9ea2b3f2665ecfc2823a7bf1980f46b 100755 (executable)
@@ -6,7 +6,7 @@ ldflags()
 {
        if [ $(uname -s) == "Darwin" ]; then 
                #OSX seems to need ncurses too
-               echo -n "-lncurses"
+               echo -n "-lncurses "
        fi
        pkg-config --libs ncursesw 2>/dev/null && exit
        pkg-config --libs ncurses 2>/dev/null && exit
@@ -43,7 +43,7 @@ ccflags()
        fi
        if [ $(uname -s) == "Darwin" ]; then
                #OSX doesn't have libintl
-               echo -n "-DKBUILD_NO_NLS"
+               echo -n "-DKBUILD_NO_NLS -Wno-format-security "
        fi
 }