• Kirill Smelkov's avatar
    Fix build with Python that enables -Werror=declaration-after-statement · e0b25398
    Kirill Smelkov authored
    In C99 declaration after statement is ok, and we explicitly compile with -std=gnu99.
    
    Python >= 3.4 however adds -Werror=declaration-after-statement even for extension
    modules irregardless of their compilation flags:
    
      https://bugs.python.org/issue21121
    
    and the build fails this way:
    
        building 'wendelin.bigfile._bigfile' extension
        creating build/temp.linux-x86_64-3.4
        creating build/temp.linux-x86_64-3.4/bigfile
        creating build/temp.linux-x86_64-3.4/lib
        gcc -pthread -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall
    -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -D_GNU_SOURCE
    -I./include -I./3rdparty/ccan -I./3rdparty/include -I/usr/include/python3.4m -c bigfile/_bigfile.c -o build/temp.linux-x86_64-3.4/bigfile/_bigfile.o
    -std=gnu99 -fplan9-extensions -fvisibility=hidden
        bigfile/_bigfil...
    e0b25398
Makefile 5.53 KB