Skip to content

Commit

Permalink
compatibility patches for gcc 4.7
Browse files Browse the repository at this point in the history
Conflicts:

	Makefile
	arch/arm/boot/compressed/Makefile
  • Loading branch information
angelsl authored and Gokhan Moral committed Sep 4, 2012
1 parent 356b28a commit 9bc092b
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 16 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,7 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Werror-implicit-function-declaration \
-Wno-format-security \
-fno-delete-null-pointer-checks \
-marm -march=armv7-a -mtune=cortex-a9 \
-funswitch-loops -fpredictive-commoning \
-fmodulo-sched -fmodulo-sched-allow-regmoves
-mtune=cortex-a9
KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
KBUILD_AFLAGS := -D__ASSEMBLY__
Expand Down Expand Up @@ -572,7 +570,10 @@ KBUILD_CFLAGS += -fdiagnostics-show-option -Werror \
-Wno-error=unused-function \
-Wno-error=unused-variable \
-Wno-error=unused-value \
-Wno-error=unused-label
-Wno-error=unused-label \
-Wno-error=uninitialized \
-Wno-error=address \
-Wno-error=enum-compare
endif

include $(srctree)/arch/$(SRCARCH)/Makefile
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ CFLAGS_MODULE +=-fno-optimize-sibling-calls
endif
endif

CFLAGS_MODULE +=-fno-pic

# Need -Uarm for gcc < 3.x
KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_THUMB2) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_THUMB2) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float
Expand Down
15 changes: 12 additions & 3 deletions arch/arm/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ endif
endif

AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET)
AFLAGS_head.o += -Wa,-mcpu=cortex-a9
# change@wtl.rsengott
# FIPS_KERNEL_RAM_BASE is start of kernel text in RAM
ifeq ($(CONFIG_CRYPTO_FIPS),y)
AFLAGS_head.o += -DFIPS_KERNEL_RAM_BASE=0x40008000
endif
HEAD = head.o
OBJS += misc.o decompress.o

AFLAGS_misc.o += -Wa,-mcpu=cortex-a9
MISC = misc.o

AFLAGS_decompress.o += -Wa,-mcpu=cortex-a9
DECOMPRESS = decompress.o

FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c

#
Expand Down Expand Up @@ -91,7 +98,7 @@ suffix_$(CONFIG_KERNEL_XZ) = xzkern

targets := vmlinux vmlinux.lds \
piggy.$(suffix_y) piggy.$(suffix_y).o \
font.o font.c head.o misc.o $(OBJS)
font.o font.c head.o misc.o decompress.o $(OBJS)

# Make sure files are removed during clean
extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern lib1funcs.S ashldi3.S
Expand Down Expand Up @@ -121,6 +128,7 @@ LDFLAGS_vmlinux += -X
LDFLAGS_vmlinux += -T

# For __aeabi_uidivmod
AFLAGS_lib1funcs.o += -Wa,-mcpu=cortex-a9
lib1funcs = $(obj)/lib1funcs.o

$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S FORCE
Expand All @@ -145,14 +153,15 @@ bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \
( echo "following symbols must have non local/private scope:" >&2; \
echo "$$bad_syms" >&2; rm -f $@; false )

$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \
$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/$(MISC) $(obj)/$(DECOMPRESS) $(obj)/piggy.$(suffix_y).o \
$(addprefix $(obj)/, $(OBJS)) $(lib1funcs) $(ashldi3) FORCE
$(call if_changed,ld)
@$(check_for_bad_syms)

$(obj)/piggy.$(suffix_y): $(obj)/../Image FORCE
$(call if_changed,$(suffix_y))

AFLAGS_piggy.$(suffix_y).o += -Wa,-mcpu=cortex-a9
$(obj)/piggy.$(suffix_y).o: $(obj)/piggy.$(suffix_y) FORCE

CFLAGS_font.o := -Dstatic=
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mm/alignment.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,8 +824,10 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
case 0x08000000: /* ldm or stm, or thumb-2 32bit instruction */
if (thumb2_32b)
handler = do_alignment_t32_to_handler(&instr, regs, &offset);
else
else {
handler = do_alignment_ldmstm;
offset.un = 0;
}
break;

default:
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/samsung/s3cfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ struct s3cfb_user_chroma {
#define S3CFB_SET_ALPHA_MODE _IOW('F', 313, unsigned int)

extern struct fb_ops s3cfb_ops;
extern inline struct s3cfb_global *get_fimd_global(int id);
extern struct s3cfb_global *get_fimd_global(int id);

/* S3CFB */
extern struct s3c_platform_fb *to_fb_plat(struct device *dev);
Expand Down
9 changes: 4 additions & 5 deletions fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -5291,7 +5291,7 @@ CIFSSMBSetFileInfo(const int xid, struct cifs_tcon *tcon,
param_offset = offsetof(struct smb_com_transaction2_sfi_req, Fid) - 4;
offset = param_offset + params;

data_offset = (char *) (&pSMB->hdr.Protocol) + offset;
data_offset = (char *)pSMB + offsetof(struct smb_hdr, Protocol) + offset;

count = sizeof(FILE_BASIC_INFO);
pSMB->MaxParameterCount = cpu_to_le16(2);
Expand Down Expand Up @@ -5560,7 +5560,7 @@ CIFSSMBUnixSetFileInfo(const int xid, struct cifs_tcon *tcon,
u16 fid, u32 pid_of_opener)
{
struct smb_com_transaction2_sfi_req *pSMB = NULL;
FILE_UNIX_BASIC_INFO *data_offset;
char *data_offset;
int rc = 0;
u16 params, param_offset, offset, byte_count, count;

Expand All @@ -5582,8 +5582,7 @@ CIFSSMBUnixSetFileInfo(const int xid, struct cifs_tcon *tcon,
param_offset = offsetof(struct smb_com_transaction2_sfi_req, Fid) - 4;
offset = param_offset + params;

data_offset = (FILE_UNIX_BASIC_INFO *)
((char *)(&pSMB->hdr.Protocol) + offset);
data_offset = (char *)pSMB + offsetof(struct smb_hdr, Protocol) + offset;
count = sizeof(FILE_UNIX_BASIC_INFO);

pSMB->MaxParameterCount = cpu_to_le16(2);
Expand All @@ -5605,7 +5604,7 @@ CIFSSMBUnixSetFileInfo(const int xid, struct cifs_tcon *tcon,
inc_rfc1001_len(pSMB, byte_count);
pSMB->ByteCount = cpu_to_le16(byte_count);

cifs_fill_unix_set_info(data_offset, args);
cifs_fill_unix_set_info((FILE_UNIX_BASIC_INFO *)data_offset, args);

rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0);
if (rc)
Expand Down
2 changes: 1 addition & 1 deletion fs/ecryptfs/keystore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
struct ecryptfs_message *msg = NULL;
char *auth_tok_sig;
char *payload;
size_t payload_len;
size_t payload_len = 0;
int rc;

rc = ecryptfs_get_auth_tok_sig(&auth_tok_sig, auth_tok);
Expand Down
2 changes: 1 addition & 1 deletion kernel/trace/trace_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static
void hold_module_trace_bprintk_format(const char **start, const char **end)
{
const char **iter;
char *fmt;
char *fmt = NULL;

mutex_lock(&btrace_mutex);
for (iter = start; iter < end; iter++) {
Expand Down

0 comments on commit 9bc092b

Please sign in to comment.