Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: finally remove the obsolete variable $TOPDIR
  gitignore: ignore scripts/ihex2fw
  Kbuild: Disable the -Wformat-security gcc flag
  gitignore: ignore gcov output files
  kbuild: deb-pkg ship changelog
  Add new __init_task_data macro to be used in arch init_task.c files.
  asm-generic/vmlinux.lds.h: shuffle INIT_TASK* macro names in vmlinux.lds.h
  Add new macros for page-aligned data and bss sections.
  asm-generic/vmlinux.lds.h: Fix up RW_DATA_SECTION definition.
  • Loading branch information
Linus Torvalds committed Jul 4, 2009
2 parents 59107c6 + 1129423 commit 29f3177
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
*.gz
*.lzma
*.patch
*.gcno

#
# Top-level generic files
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,13 @@ _all: modules
endif

srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
TOPDIR := $(srctree)
# FIXME - TOPDIR is obsolete, use srctree/objtree
objtree := $(CURDIR)
src := $(srctree)
obj := $(objtree)

VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD))

export srctree objtree VPATH TOPDIR
export srctree objtree VPATH


# SUBARCH tells the usermode build what the underlying arch is. That is set
Expand Down Expand Up @@ -344,7 +342,8 @@ KBUILD_CPPFLAGS := -D__KERNEL__

KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration
-Werror-implicit-function-declaration \
-Wno-format-security
KBUILD_AFLAGS := -D__ASSEMBLY__

# Read KERNELRELEASE from include/config/kernel.release (if it exists)
Expand Down
2 changes: 1 addition & 1 deletion arch/mn10300/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ SECTIONS
_edata = .; /* End of data section */
}

.data.init_task : { INIT_TASK(THREAD_SIZE); }
.data.init_task : { INIT_TASK_DATA(THREAD_SIZE); }

/* might get freed after init */
. = ALIGN(PAGE_SIZE);
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/cxgb3i/Kbuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXTRA_CFLAGS += -I$(TOPDIR)/drivers/net/cxgb3
EXTRA_CFLAGS += -I$(srctree)/drivers/net/cxgb3

cxgb3i-y := cxgb3i_init.o cxgb3i_iscsi.o cxgb3i_pdu.o cxgb3i_offload.o cxgb3i_ddp.o
obj-$(CONFIG_SCSI_CXGB3_ISCSI) += cxgb3i.o
12 changes: 6 additions & 6 deletions include/asm-generic/vmlinux.lds.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
. = ALIGN(align); \
*(.data.cacheline_aligned)

#define INIT_TASK(align) \
#define INIT_TASK_DATA(align) \
. = ALIGN(align); \
*(.data.init_task)

Expand Down Expand Up @@ -434,10 +434,10 @@
/*
* Init task
*/
#define INIT_TASK_DATA(align) \
#define INIT_TASK_DATA_SECTION(align) \
. = ALIGN(align); \
.data.init_task : { \
INIT_TASK \
INIT_TASK_DATA(align) \
}

#ifdef CONFIG_CONSTRUCTORS
Expand Down Expand Up @@ -705,15 +705,15 @@
* matches the requirment of PAGE_ALIGNED_DATA.
*
* use 0 as page_align if page_aligned data is not used */
#define RW_DATA_SECTION(cacheline, nosave, pagealigned, inittask) \
#define RW_DATA_SECTION(cacheline, pagealigned, inittask) \
. = ALIGN(PAGE_SIZE); \
.data : AT(ADDR(.data) - LOAD_OFFSET) { \
INIT_TASK(inittask) \
INIT_TASK_DATA(inittask) \
CACHELINE_ALIGNED_DATA(cacheline) \
READ_MOSTLY_DATA(cacheline) \
DATA_DATA \
CONSTRUCTORS \
NOSAVE_DATA(nosave) \
NOSAVE_DATA \
PAGE_ALIGNED_DATA(pagealigned) \
}

Expand Down
3 changes: 3 additions & 0 deletions include/linux/init_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,8 @@ extern struct cred init_cred;
LIST_HEAD_INIT(cpu_timers[2]), \
}

/* Attach to the init_task data structure for proper alignment */
#define __init_task_data __attribute__((__section__(".data.init_task")))


#endif
9 changes: 9 additions & 0 deletions include/linux/linkage.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
#define __page_aligned_data __section(.data.page_aligned) __aligned(PAGE_SIZE)
#define __page_aligned_bss __section(.bss.page_aligned) __aligned(PAGE_SIZE)

/*
* For assembly routines.
*
* Note when using these that you must specify the appropriate
* alignment directives yourself
*/
#define __PAGE_ALIGNED_DATA .section ".data.page_aligned", "aw"
#define __PAGE_ALIGNED_BSS .section ".bss.page_aligned", "aw"

/*
* This is used by architectures to keep arguments on the stack
* untouched by the compiler by keeping them live until the end.
Expand Down
1 change: 1 addition & 0 deletions scripts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pnmtologo
bin2c
unifdef
binoffset
ihex2fw
2 changes: 2 additions & 0 deletions scripts/package/builddeb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ create_package() {
local pname="$1" pdir="$2"

cp debian/copyright "$pdir/usr/share/doc/$pname/"
cp debian/changelog "$pdir/usr/share/doc/$pname/changelog.Debian"
gzip -9 "$pdir/usr/share/doc/$pname/changelog.Debian"

# Fix ownership and permissions
chown -R root:root "$pdir"
Expand Down

0 comments on commit 29f3177

Please sign in to comment.