{"action":"created","issue":{"url":"https://api.github.com/repos/pure-data/pd-lib-builder/issues/5","labels_url":"https://api.github.com/repos/pure-data/pd-lib-builder/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/pure-data/pd-lib-builder/issues/5/comments","events_url":"https://api.github.com/repos/pure-data/pd-lib-builder/issues/5/events","html_url":"https://github.com/pure-data/pd-lib-builder/issues/5","id":114032467,"number":5,"title":"arch.flags vs CFLAGS","user":{"login":"umlaeute","id":214034,"avatar_url":"https://avatars.githubusercontent.com/u/214034?v=3","gravatar_id":"","url":"https://api.github.com/users/umlaeute","html_url":"https://github.com/umlaeute","followers_url":"https://api.github.com/users/umlaeute/followers","following_url":"https://api.github.com/users/umlaeute/following{/other_user}","gists_url":"https://api.github.com/users/umlaeute/gists{/gist_id}","starred_url":"https://api.github.com/users/umlaeute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umlaeute/subscriptions","organizations_url":"https://api.github.com/users/umlaeute/orgs","repos_url":"https://api.github.com/users/umlaeute/repos","events_url":"https://api.github.com/users/umlaeute/events{/privacy}","received_events_url":"https://api.github.com/users/umlaeute/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-29T11:41:30Z","updated_at":"2015-10-30T01:32:05Z","closed_at":null,"body":"i just noticed that `arch.flags` will prevail even when i pass `CFLAGS` to the build:\r\n\r\n     $ make CFLAGS=\"-g -O2\"\r\n\r\nwill still contain `-march=core2 -mfpmath=sse -msse -msse2`, which is contrary to what i would expect, as these architecture specifc flags are not strictly needed to produce a valid build (and i would argue that they are rather optimization flags).\r\n\r\nI understand that it is easy to add another `arch.flags=\"\"` to make call to *make*, but i think the current behaviour does not follow [POLA](https://en.wikipedia.org/wiki/Principle_of_least_astonishment)."},"comment":{"url":"https://api.github.com/repos/pure-data/pd-lib-builder/issues/comments/152374800","html_url":"https://github.com/pure-data/pd-lib-builder/issues/5#issuecomment-152374800","issue_url":"https://api.github.com/repos/pure-data/pd-lib-builder/issues/5","id":152374800,"user":{"login":"katjav","id":1105733,"avatar_url":"https://avatars.githubusercontent.com/u/1105733?v=3","gravatar_id":"","url":"https://api.github.com/users/katjav","html_url":"https://github.com/katjav","followers_url":"https://api.github.com/users/katjav/followers","following_url":"https://api.github.com/users/katjav/following{/other_user}","gists_url":"https://api.github.com/users/katjav/gists{/gist_id}","starred_url":"https://api.github.com/users/katjav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katjav/subscriptions","organizations_url":"https://api.github.com/users/katjav/orgs","repos_url":"https://api.github.com/users/katjav/repos","events_url":"https://api.github.com/users/katjav/events{/privacy}","received_events_url":"https://api.github.com/users/katjav/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T01:32:05Z","updated_at":"2015-10-30T01:32:05Z","body":"True, all optimization flags should be overridable by CFLAGS so it isn't done correctly in Makefile.pdlibbuilder. \r\n\r\nI had classified -f flags as optimization flags and -m flags as architecture flags .The -m flags tune asm code to specific architecture and in many cases that means optimization. But -m flags like -mfloat-abi=hard, -mmacosx-version-min=10.4, are about compatibility rather than optimization. Also some -m flags are needed in the linking process. Not all -m flags should be overridable by CFLAGS, so the category must be subdivided somehow.\r\n\r\n"}}