{"action":"created","issue":{"url":"https://api.github.com/repos/luarocks/luarocks/issues/129","repository_url":"https://api.github.com/repos/luarocks/luarocks","labels_url":"https://api.github.com/repos/luarocks/luarocks/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/luarocks/luarocks/issues/129/comments","events_url":"https://api.github.com/repos/luarocks/luarocks/issues/129/events","html_url":"https://github.com/luarocks/luarocks/issues/129","id":13789196,"number":129,"title":"Add custom compilation flags","user":{"login":"mtourne","id":214840,"avatar_url":"https://avatars2.githubusercontent.com/u/214840?v=4","gravatar_id":"","url":"https://api.github.com/users/mtourne","html_url":"https://github.com/mtourne","followers_url":"https://api.github.com/users/mtourne/followers","following_url":"https://api.github.com/users/mtourne/following{/other_user}","gists_url":"https://api.github.com/users/mtourne/gists{/gist_id}","starred_url":"https://api.github.com/users/mtourne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtourne/subscriptions","organizations_url":"https://api.github.com/users/mtourne/orgs","repos_url":"https://api.github.com/users/mtourne/repos","events_url":"https://api.github.com/users/mtourne/events{/privacy}","received_events_url":"https://api.github.com/users/mtourne/received_events","type":"User","site_admin":false},"labels":[{"id":84530,"url":"https://api.github.com/repos/luarocks/luarocks/labels/feature%20request","name":"feature request","color":"cff5cf","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/luarocks/luarocks/milestones/2","html_url":"https://github.com/luarocks/luarocks/milestone/2","labels_url":"https://api.github.com/repos/luarocks/luarocks/milestones/2/labels","id":1692,"number":2,"title":"LuaRocks 3","description":"","creator":{"login":"hishamhm","id":245621,"avatar_url":"https://avatars3.githubusercontent.com/u/245621?v=4","gravatar_id":"","url":"https://api.github.com/users/hishamhm","html_url":"https://github.com/hishamhm","followers_url":"https://api.github.com/users/hishamhm/followers","following_url":"https://api.github.com/users/hishamhm/following{/other_user}","gists_url":"https://api.github.com/users/hishamhm/gists{/gist_id}","starred_url":"https://api.github.com/users/hishamhm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hishamhm/subscriptions","organizations_url":"https://api.github.com/users/hishamhm/orgs","repos_url":"https://api.github.com/users/hishamhm/repos","events_url":"https://api.github.com/users/hishamhm/events{/privacy}","received_events_url":"https://api.github.com/users/hishamhm/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":3,"state":"open","created_at":"2011-04-11T17:26:00Z","updated_at":"2016-09-12T16:36:42Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2013-04-30T01:37:44Z","updated_at":"2018-04-08T22:12:35Z","closed_at":null,"author_association":"NONE","body":"I wish it would be possible to add custom CFLAGS from the command line, or in the rockspec file directly.\n\nCurrently setting CFLAGS=-g to add debug symbol to a particular lib will overwrite _all_ of the original CFLAGS and it won't build anymore.\n\nOr maybe I've missed an obvious way to do that ?\n"},"comment":{"url":"https://api.github.com/repos/luarocks/luarocks/issues/comments/379587013","html_url":"https://github.com/luarocks/luarocks/issues/129#issuecomment-379587013","issue_url":"https://api.github.com/repos/luarocks/luarocks/issues/129","id":379587013,"user":{"login":"craigbarnes","id":494077,"avatar_url":"https://avatars0.githubusercontent.com/u/494077?v=4","gravatar_id":"","url":"https://api.github.com/users/craigbarnes","html_url":"https://github.com/craigbarnes","followers_url":"https://api.github.com/users/craigbarnes/followers","following_url":"https://api.github.com/users/craigbarnes/following{/other_user}","gists_url":"https://api.github.com/users/craigbarnes/gists{/gist_id}","starred_url":"https://api.github.com/users/craigbarnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigbarnes/subscriptions","organizations_url":"https://api.github.com/users/craigbarnes/orgs","repos_url":"https://api.github.com/users/craigbarnes/repos","events_url":"https://api.github.com/users/craigbarnes/events{/privacy}","received_events_url":"https://api.github.com/users/craigbarnes/received_events","type":"User","site_admin":false},"created_at":"2018-04-08T22:12:35Z","updated_at":"2018-04-08T22:12:35Z","author_association":"NONE","body":"> Currently setting CFLAGS=-g to add debug symbol to a particular lib will overwrite all of the original CFLAGS and it won't build anymore.\r\n\r\nIf a lib is using the `CFLAGS` variable to store essential compiler flags, then that lib's build system is broken.\r\n\r\n> If there are C compiler options that must be used for proper compilation of certain files, do not include them in `CFLAGS`. Users expect to be able to specify `CFLAGS` freely themselves. Instead, arrange to pass the necessary options to the C compiler independently of `CFLAGS`, by writing them explicitly in the compilation commands or by defining an implicit rule, like this:\r\n>\r\n>```\r\n>CFLAGS = -g\r\n>ALL_CFLAGS = -I. $(CFLAGS)\r\n>.c.o:\r\n>        $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<\r\n>```\r\n\r\n-- https://www.gnu.org/prep/standards/html_node/Command-Variables.html\r\n\r\nThis convention goes back decades. Most Linux distro packaging scripts overwrite `CFLAGS` by default."}}
{"actor":{"display_login":"craigbarnes"}}