{"action":"created","issue":{"url":"https://api.github.com/repos/mackron/dr_libs/issues/35","repository_url":"https://api.github.com/repos/mackron/dr_libs","labels_url":"https://api.github.com/repos/mackron/dr_libs/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/mackron/dr_libs/issues/35/comments","events_url":"https://api.github.com/repos/mackron/dr_libs/issues/35/events","html_url":"https://github.com/mackron/dr_libs/issues/35","id":343432705,"node_id":"MDU6SXNzdWUzNDM0MzI3MDU=","number":35,"title":"dr_flac.h build failure with -fPIC","user":{"login":"sezero","id":4222725,"node_id":"MDQ6VXNlcjQyMjI3MjU=","avatar_url":"https://avatars2.githubusercontent.com/u/4222725?v=4","gravatar_id":"","url":"https://api.github.com/users/sezero","html_url":"https://github.com/sezero","followers_url":"https://api.github.com/users/sezero/followers","following_url":"https://api.github.com/users/sezero/following{/other_user}","gists_url":"https://api.github.com/users/sezero/gists{/gist_id}","starred_url":"https://api.github.com/users/sezero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sezero/subscriptions","organizations_url":"https://api.github.com/users/sezero/orgs","repos_url":"https://api.github.com/users/sezero/repos","events_url":"https://api.github.com/users/sezero/events{/privacy}","received_events_url":"https://api.github.com/users/sezero/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2018-07-22T19:41:53Z","updated_at":"2018-07-24T10:57:43Z","closed_at":null,"author_association":"NONE","body":"This is on CentOS 6.10 / i686 with gcc-4.4.7 as came with the OS:\r\n\r\n```\r\n$ gcc -xc -O3 -DDR_FLAC_IMPLEMENTATION -DNDEBUG -std=gnu99 -fPIC -o dr_flac.c.o -c dr_flac.h\r\ndr_flac.h:799:1: warning: \"_BSD_SOURCE\" redefined\r\nIn file included from /usr/include/stdint.h:26,\r\n                 from dr_flac.h:133:\r\n/usr/include/features.h:182:1: warning: this is the location of the previous definition\r\ndr_flac.h: In function ‘drflac__swap_endian_uint16’:\r\ndr_flac.h:921: warning: implicit declaration of function ‘__builtin_bswap16’\r\ndr_flac.h: In function ‘drflac_open_with_metadata_private’:\r\ndr_flac.h:785: error: can't find a register in class ‘BREG’ while reloading ‘asm’\r\ndr_flac.h:785: error: can't find a register in class ‘BREG’ while reloading ‘asm’\r\ndr_flac.h:785: error: ‘asm’ operand has impossible constraints\r\ndr_flac.h:785: error: ‘asm’ operand has impossible constraints\r\n```\r\n\r\nThe cpuid asm failure seems to be because ebx is the PIC register:\r\nThe failure doesn't happen without -fPIC.\r\n\r\nThe __builtin_bswap16 warning is there because, unlike __builtin_bswap32,\r\n__builtin_bswap16 is added in gcc-4.8, not gcc-4.3.\r\n\r\n\r\ngcc-4.9.4 fails in a similar way:\r\n```\r\n$ gcc49 -xc -O3 -DDR_FLAC_IMPLEMENTATION -DNDEBUG -std=gnu99 -fPIC -o dr_flac.c.o -c dr_flac.h\r\ndr_flac.h:799:0: warning: \"_BSD_SOURCE\" redefined\r\n #define _BSD_SOURCE\r\n ^\r\nIn file included from /usr/include/stdint.h:26:0,\r\n                 from /opt/gcc490/lib/gcc/i686-pc-linux-gnu/4.9.4/include/stdint.h:9,\r\n                 from dr_flac.h:133:\r\n/usr/include/features.h:182:0: note: this is the location of the previous definition\r\n # define _BSD_SOURCE 1\r\n ^\r\ndr_flac.h: In function 'drflac_open_with_metadata_private':\r\ndr_flac.h:785:17: error: inconsistent operand constraints in an 'asm'\r\n                 __asm__ __volatile__ (\r\n                 ^\r\ndr_flac.h:785:17: error: inconsistent operand constraints in an 'asm'\r\n                 __asm__ __volatile__ (\r\n                 ^\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/mackron/dr_libs/issues/comments/407365998","html_url":"https://github.com/mackron/dr_libs/issues/35#issuecomment-407365998","issue_url":"https://api.github.com/repos/mackron/dr_libs/issues/35","id":407365998,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzM2NTk5OA==","user":{"login":"sezero","id":4222725,"node_id":"MDQ6VXNlcjQyMjI3MjU=","avatar_url":"https://avatars2.githubusercontent.com/u/4222725?v=4","gravatar_id":"","url":"https://api.github.com/users/sezero","html_url":"https://github.com/sezero","followers_url":"https://api.github.com/users/sezero/followers","following_url":"https://api.github.com/users/sezero/following{/other_user}","gists_url":"https://api.github.com/users/sezero/gists{/gist_id}","starred_url":"https://api.github.com/users/sezero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sezero/subscriptions","organizations_url":"https://api.github.com/users/sezero/orgs","repos_url":"https://api.github.com/users/sezero/repos","events_url":"https://api.github.com/users/sezero/events{/privacy}","received_events_url":"https://api.github.com/users/sezero/received_events","type":"User","site_admin":false},"created_at":"2018-07-24T10:57:43Z","updated_at":"2018-07-24T10:57:43Z","author_association":"NONE","body":"Seems OK now, thanks.\r\n\r\nBTW, using a newline ('\\n\\t') instead of semicolon (';') gives a more\r\nreadable output witth gcc -S, but that's your choice of coding style."}}
{"actor":{"display_login":"sezero"}}