mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
tools/Makefile: Move _GNU_SOURCE to Makefile
Commit 669dfc2e
adds libfdt_env.h to HOSTCPPFLAGS. It causes stdio.h
to be included before _GNU_SOURCE is defined in C files. On some old hosts
some prototypes are protected by #ifdef __USE_GNU, which is set when
_GNU_SOURCE is defined.
Signed-off-by: York Sun <yorksun@freescale.com>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@ -154,6 +154,7 @@ NOPEDOBJS := $(addprefix $(obj),$(NOPED_OBJ_FILES-y))
|
|||||||
#
|
#
|
||||||
# Use native tools and options
|
# Use native tools and options
|
||||||
# Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
|
# Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
|
||||||
|
# Define _GNU_SOURCE to obtain the getline prototype from stdio.h
|
||||||
#
|
#
|
||||||
HOSTCPPFLAGS = -include $(SRCTREE)/include/libfdt_env.h \
|
HOSTCPPFLAGS = -include $(SRCTREE)/include/libfdt_env.h \
|
||||||
-idirafter $(SRCTREE)/include \
|
-idirafter $(SRCTREE)/include \
|
||||||
@ -163,7 +164,8 @@ HOSTCPPFLAGS = -include $(SRCTREE)/include/libfdt_env.h \
|
|||||||
-I $(SRCTREE)/tools \
|
-I $(SRCTREE)/tools \
|
||||||
-DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \
|
-DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \
|
||||||
-DUSE_HOSTCC \
|
-DUSE_HOSTCC \
|
||||||
-D__KERNEL_STRICT_NAMES
|
-D__KERNEL_STRICT_NAMES \
|
||||||
|
-D_GNU_SOURCE
|
||||||
|
|
||||||
|
|
||||||
all: $(obj).depend $(BINS) $(LOGO-y) subdirs
|
all: $(obj).depend $(BINS) $(LOGO-y) subdirs
|
||||||
|
@ -5,9 +5,6 @@
|
|||||||
* SPDX-License-Identifier: GPL-2.0+
|
* SPDX-License-Identifier: GPL-2.0+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Required to obtain the getline prototype from stdio.h */
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
|
|
||||||
#include "mkimage.h"
|
#include "mkimage.h"
|
||||||
#include "aisimage.h"
|
#include "aisimage.h"
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
|
@ -9,9 +9,6 @@
|
|||||||
* SPDX-License-Identifier: GPL-2.0+
|
* SPDX-License-Identifier: GPL-2.0+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Required to obtain the getline prototype from stdio.h */
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
|
|
||||||
#include "mkimage.h"
|
#include "mkimage.h"
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
#include "imximage.h"
|
#include "imximage.h"
|
||||||
|
@ -6,9 +6,6 @@
|
|||||||
* SPDX-License-Identifier: GPL-2.0+
|
* SPDX-License-Identifier: GPL-2.0+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Required to obtain the getline prototype from stdio.h */
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
|
|
||||||
#include "mkimage.h"
|
#include "mkimage.h"
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
#include "kwbimage.h"
|
#include "kwbimage.h"
|
||||||
|
@ -9,9 +9,6 @@
|
|||||||
* SPDX-License-Identifier: GPL-2.0+
|
* SPDX-License-Identifier: GPL-2.0+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* We want the GNU version of basename() */
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -14,9 +14,6 @@
|
|||||||
* SPDX-License-Identifier: GPL-2.0+
|
* SPDX-License-Identifier: GPL-2.0+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Required to obtain the getline prototype from stdio.h */
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
|
|
||||||
#include "mkimage.h"
|
#include "mkimage.h"
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
#include "omapimage.h"
|
#include "omapimage.h"
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
*
|
*
|
||||||
* SPDX-License-Identifier: GPL-2.0+
|
* SPDX-License-Identifier: GPL-2.0+
|
||||||
*/
|
*/
|
||||||
#define _GNU_SOURCE
|
|
||||||
|
|
||||||
#include "mkimage.h"
|
#include "mkimage.h"
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
#include "pblimage.h"
|
#include "pblimage.h"
|
||||||
|
@ -13,9 +13,6 @@
|
|||||||
* SPDX-License-Identifier: GPL-2.0+
|
* SPDX-License-Identifier: GPL-2.0+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Required to obtain the getline prototype from stdio.h */
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
|
|
||||||
#include "mkimage.h"
|
#include "mkimage.h"
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
#include "ublimage.h"
|
#include "ublimage.h"
|
||||||
|
Reference in New Issue
Block a user