Hello community, here is the log from the commit of package sparse for openSUSE:Factory checked in at 2019-11-04 17:16:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sparse (Old) and /work/SRC/openSUSE:Factory/.sparse.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "sparse" Mon Nov 4 17:16:07 2019 rev:38 rq:745101 version:0.6.1+20191101 Changes: -------- --- /work/SRC/openSUSE:Factory/sparse/sparse.changes 2019-10-10 11:53:21.451335208 +0200 +++ /work/SRC/openSUSE:Factory/.sparse.new.2990/sparse.changes 2019-11-04 17:16:12.400889323 +0100 @@ -1,0 +2,13 @@ +Mon Nov 04 08:06:46 UTC 2019 - jslaby@suse.com + +- Update to version 0.6.1+20191101: + * .gitignore: alphasort the patterns + * Add '__' prefix and suffix to all __attribute__ #defines + * options: add support for -mcmodel + * options: add support for -fpic, -fPIC, -fpie & -fPIE + * Sparse v0.6.1 + * doc: fix typo in binops' description + * "graph" segfaults on top-level asm + * llvm: fix sparsec breakage on recent cygwin version + +------------------------------------------------------------------- Old: ---- sparse-0.6.1rc2+20191007.tar.xz New: ---- sparse-0.6.1+20191101.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sparse.spec ++++++ --- /var/tmp/diff_new_pack.d8oAIK/_old 2019-11-04 17:16:13.272890254 +0100 +++ /var/tmp/diff_new_pack.d8oAIK/_new 2019-11-04 17:16:13.280890262 +0100 @@ -17,7 +17,7 @@ Name: sparse -Version: 0.6.1rc2+20191007 +Version: 0.6.1+20191101 Release: 0 Summary: A semantic parser of source files License: MIT ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.d8oAIK/_old 2019-11-04 17:16:13.388890378 +0100 +++ /var/tmp/diff_new_pack.d8oAIK/_new 2019-11-04 17:16:13.392890382 +0100 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">git://git.kernel.org/pub/scm/devel/sparse/sparse.git</param> - <param name="changesrevision">0ccb3b4f73805d49a266a23f11d640cef8c47553</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">57f861160762b498b4c90a68ee4863e12a9c899c</param></service></servicedata> \ No newline at end of file ++++++ sparse-0.6.1rc2+20191007.tar.xz -> sparse-0.6.1+20191101.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.6.1rc2+20191007/Documentation/IR.rst new/sparse-0.6.1+20191101/Documentation/IR.rst --- old/sparse-0.6.1rc2+20191007/Documentation/IR.rst 2019-10-07 09:46:35.000000000 +0200 +++ new/sparse-0.6.1+20191101/Documentation/IR.rst 2019-11-01 10:05:12.000000000 +0100 @@ -56,7 +56,7 @@ Arithmetic binops ----------------- They all follow the same signature: - * .src1, .src1: operands (types must be compatible with .target) + * .src1, .src2: operands (types must be compatible with .target) * .target: result of the operation (must be an integral type) * .type: type of .target @@ -93,7 +93,7 @@ Floating-point binops --------------------- They all follow the same signature: - * .src1, .src1: operands (types must be compatible with .target) + * .src1, .src2: operands (types must be compatible with .target) * .target: result of the operation (must be a floating-point type) * .type: type of .target diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.6.1rc2+20191007/Makefile new/sparse-0.6.1+20191101/Makefile --- old/sparse-0.6.1rc2+20191007/Makefile 2019-10-07 09:46:35.000000000 +0200 +++ new/sparse-0.6.1+20191101/Makefile 2019-11-01 10:05:12.000000000 +0100 @@ -1,4 +1,4 @@ -VERSION=0.6.1-rc2 +VERSION=0.6.1 ######################################################################## # The following variables can be overwritten from the command line diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.6.1rc2+20191007/lib.c new/sparse-0.6.1+20191101/lib.c --- old/sparse-0.6.1rc2+20191007/lib.c 2019-10-07 09:46:35.000000000 +0200 +++ new/sparse-0.6.1+20191101/lib.c 2019-11-01 10:05:12.000000000 +0100 @@ -310,6 +310,8 @@ int fmem_report = 0; unsigned long long fmemcpy_max_count = 100000; unsigned long fpasses = ~0UL; +int fpic = 0; +int fpie = 0; int funsigned_char = UNSIGNED_CHAR; int preprocess_only; @@ -326,6 +328,7 @@ int arch_m64 = ARCH_M64_DEFAULT; int arch_big_endian = ARCH_BIG_ENDIAN; int arch_mach = MACH_NATIVE; +int arch_cmodel = CMODEL_UNKNOWN; #define CMDLINE_INCLUDE 20 @@ -468,6 +471,26 @@ arch_big_endian = 1; } else if (!strcmp(arg, "mlittle-endian")) { arch_big_endian = 0; + } else if (!strncmp(arg, "mcmodel", 7)) { + arg += 7; + if (*arg++ != '=') + die("missing argument for -mcmodel"); + else if (!strcmp(arg, "kernel")) + arch_cmodel = CMODEL_KERNEL; + else if (!strcmp(arg, "large")) + arch_cmodel = CMODEL_LARGE; + else if (!strcmp(arg, "medany")) + arch_cmodel = CMODEL_MEDANY; + else if (!strcmp(arg, "medium")) + arch_cmodel = CMODEL_MEDIUM; + else if (!strcmp(arg, "medlow")) + arch_cmodel = CMODEL_MEDLOW; + else if (!strcmp(arg, "small")) + arch_cmodel = CMODEL_SMALL; + else if (!strcmp(arg, "tiny")) + arch_cmodel = CMODEL_TINY; + else + die("invalid argument for -mcmodel=%s", arg); } return next; } @@ -483,6 +506,23 @@ static void handle_arch_finalize(void) { handle_arch_msize_long_finalize(); + + if (fpie > fpic) + fpic = fpie; + + switch (arch_mach) { + case MACH_ARM64: + if (arch_cmodel == CMODEL_UNKNOWN) + arch_cmodel = CMODEL_SMALL; + break; + case MACH_RISCV32: + case MACH_RISCV64: + if (arch_cmodel == CMODEL_UNKNOWN) + arch_cmodel = CMODEL_MEDLOW; + if (fpic) + arch_cmodel = CMODEL_PIC; + break; + } } static const char *match_option(const char *arg, const char *prefix) @@ -592,6 +632,12 @@ return 0; } +static int handle_switch_setval(const char *arg, const char *opt, const struct flag *flag, int options) +{ + *(flag->flag) = flag->mask; + return 1; +} + #define OPTNUM_ZERO_IS_INF 1 #define OPTNUM_UNLIMITED 2 @@ -940,6 +986,10 @@ { "tabstop=", NULL, handle_ftabstop }, { "mem2reg", NULL, handle_fpasses, PASS_MEM2REG }, { "optim", NULL, handle_fpasses, PASS_OPTIM }, + { "pic", &fpic, handle_switch_setval, 1 }, + { "PIC", &fpic, handle_switch_setval, 2 }, + { "pie", &fpie, handle_switch_setval, 1 }, + { "PIE", &fpie, handle_switch_setval, 2 }, { "signed-char", &funsigned_char, NULL, OPT_INVERSE }, { "unsigned-char", &funsigned_char, NULL, }, { }, @@ -1198,6 +1248,55 @@ predefined_width(name, bits); } +static void predefined_cmodel(void) +{ + const char *pre, *suf; + const char *def = NULL; + switch (arch_mach) { + case MACH_ARM64: + pre = "__AARCH64_CMODEL_"; + suf = "__"; + switch (arch_cmodel) { + case CMODEL_LARGE: + def = "LARGE"; + break; + case CMODEL_SMALL: + def = "SMALL"; + break; + case CMODEL_TINY: + def = "TINY"; + break; + default: + break; + } + break; + case MACH_RISCV32: + case MACH_RISCV64: + pre = "__riscv_cmodel_"; + suf = ""; + switch (arch_cmodel) { + case CMODEL_MEDLOW: + def = "medlow"; + break; + case CMODEL_MEDANY: + def = "medany"; + break; + case CMODEL_PIC: + def = "pic"; + break; + default: + break; + } + break; + default: + break; + } + + if (!def) + return; + add_pre_buffer("#weak_define %s%s%s 1\n", pre, def, suf); +} + static void predefined_macros(void) { predefine("__CHECKER__", 0, "1"); @@ -1382,6 +1481,17 @@ predefine("__i386", 1, "1"); break; } + + if (fpic) { + predefine("__pic__", 0, "%d", fpic); + predefine("__PIC__", 0, "%d", fpic); + } + if (fpie) { + predefine("__pie__", 0, "%d", fpie); + predefine("__PIE__", 0, "%d", fpie); + } + + predefined_cmodel(); } static void create_builtin_stream(void) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.6.1rc2+20191007/lib.h new/sparse-0.6.1+20191101/lib.h --- old/sparse-0.6.1rc2+20191007/lib.h 2019-10-07 09:46:35.000000000 +0200 +++ new/sparse-0.6.1+20191101/lib.h 2019-11-01 10:05:12.000000000 +0100 @@ -199,12 +199,27 @@ extern unsigned long fdump_ir; extern unsigned long long fmemcpy_max_count; extern unsigned long fpasses; +extern int fpic; +extern int fpie; extern int funsigned_char; extern int arch_m64; extern int arch_big_endian; extern int arch_mach; +enum { + CMODEL_UNKNOWN, + CMODEL_KERNEL, + CMODEL_LARGE, + CMODEL_MEDANY, + CMODEL_MEDIUM, + CMODEL_MEDLOW, + CMODEL_PIC, + CMODEL_SMALL, + CMODEL_TINY, +}; +extern int arch_cmodel; + extern void dump_macro_definitions(void); extern struct symbol_list *sparse_initialize(int argc, char **argv, struct string_list **files); extern struct symbol_list *__sparse(char *filename); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.6.1rc2+20191007/parse.c new/sparse-0.6.1+20191101/parse.c --- old/sparse-0.6.1rc2+20191007/parse.c 2019-10-07 09:46:35.000000000 +0200 +++ new/sparse-0.6.1+20191101/parse.c 2019-11-01 10:05:12.000000000 +0100 @@ -345,6 +345,7 @@ static struct symbol_op __context___op = { .statement = parse_context_statement, + .attribute = attribute_context, }; static struct symbol_op range_op = { @@ -537,6 +538,7 @@ { "while", NS_KEYWORD, .op = &while_op }, { "do", NS_KEYWORD, .op = &do_op }, { "goto", NS_KEYWORD, .op = &goto_op }, + { "context", NS_KEYWORD, .op = &context_op }, { "__context__",NS_KEYWORD, .op = &__context___op }, { "__range__", NS_KEYWORD, .op = &range_op }, { "asm", NS_KEYWORD, .op = &asm_op }, @@ -549,13 +551,17 @@ { "aligned", NS_KEYWORD, .op = &aligned_op }, { "__aligned__",NS_KEYWORD, .op = &aligned_op }, { "nocast", NS_KEYWORD, MOD_NOCAST, .op = &attr_mod_op }, + { "__nocast__", NS_KEYWORD, MOD_NOCAST, .op = &attr_mod_op }, { "noderef", NS_KEYWORD, MOD_NODEREF, .op = &attr_mod_op }, + { "__noderef__",NS_KEYWORD, MOD_NODEREF, .op = &attr_mod_op }, { "safe", NS_KEYWORD, MOD_SAFE, .op = &attr_mod_op }, + { "__safe__", NS_KEYWORD, MOD_SAFE, .op = &attr_mod_op }, { "force", NS_KEYWORD, .op = &attr_force_op }, + { "__force__", NS_KEYWORD, .op = &attr_force_op }, { "bitwise", NS_KEYWORD, MOD_BITWISE, .op = &attr_bitwise_op }, { "__bitwise__",NS_KEYWORD, MOD_BITWISE, .op = &attr_bitwise_op }, { "address_space",NS_KEYWORD, .op = &address_space_op }, - { "context", NS_KEYWORD, .op = &context_op }, + { "__address_space__",NS_KEYWORD, .op = &address_space_op }, { "designated_init", NS_KEYWORD, .op = &designated_init_op }, { "__designated_init__", NS_KEYWORD, .op = &designated_init_op }, { "transparent_union", NS_KEYWORD, .op = &transparent_union_op }, @@ -2890,7 +2896,7 @@ token = parse_asm_statement(token, stmt); - add_symbol(list, anon); + // FIXME: add_symbol(list, anon); return token; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.6.1rc2+20191007/sparsec new/sparse-0.6.1+20191101/sparsec --- old/sparse-0.6.1rc2+20191007/sparsec 2019-10-07 09:46:35.000000000 +0200 +++ new/sparse-0.6.1+20191101/sparsec 2019-11-01 10:05:12.000000000 +0100 @@ -39,6 +39,7 @@ *CYGWIN*) # cygwin uses the sjlj (setjmp-longjmp) exception model LLC_ARCH_OPTS="-exception-model=sjlj" + LLC_ARCH_OPTS="$LLC_ARCH_OPTS -mtriple=$(llvm-config --host-target)" ;; *) ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.6.1rc2+20191007/validation/linear/asm-toplevel.c new/sparse-0.6.1+20191101/validation/linear/asm-toplevel.c --- old/sparse-0.6.1rc2+20191007/validation/linear/asm-toplevel.c 2019-10-07 09:46:35.000000000 +0200 +++ new/sparse-0.6.1+20191101/validation/linear/asm-toplevel.c 2019-11-01 10:05:12.000000000 +0100 @@ -2,6 +2,7 @@ /* * check-name: asm-toplevel.c * check-command: test-linearize $file + * check-known-to-fail * check-output-ignore * check-output-contains: asm *".. nothing .." */