{"action":"created","issue":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/3744","repository_url":"https://api.github.com/repos/ARMmbed/mbed-os","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/3744/labels{/name}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/3744/comments","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/3744/events","html_url":"https://github.com/ARMmbed/mbed-os/issues/3744","id":206853853,"number":3744,"title":"Exporter: generated gcc_arm makefile calls linker with LD_FLAGS twice","user":{"login":"JojoS62","id":6775562,"avatar_url":"https://avatars.githubusercontent.com/u/6775562?v=3","gravatar_id":"","url":"https://api.github.com/users/JojoS62","html_url":"https://github.com/JojoS62","followers_url":"https://api.github.com/users/JojoS62/followers","following_url":"https://api.github.com/users/JojoS62/following{/other_user}","gists_url":"https://api.github.com/users/JojoS62/gists{/gist_id}","starred_url":"https://api.github.com/users/JojoS62/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JojoS62/subscriptions","organizations_url":"https://api.github.com/users/JojoS62/orgs","repos_url":"https://api.github.com/users/JojoS62/repos","events_url":"https://api.github.com/users/JojoS62/events{/privacy}","received_events_url":"https://api.github.com/users/JojoS62/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-10T17:17:07Z","updated_at":"2017-02-10T17:32:41Z","closed_at":null,"body":"Note: This is just a template, so feel free to use/remove the unnecessary things\r\n\r\n### Description\r\n- Bug\r\n\r\n---------------------------------------------------------------\r\n## Bug\r\n\r\n**Target**\r\nall\r\n\r\n**Toolchain:**\r\nGCC_ARM\r\n\r\n**Actual behavior**\r\nExporter gcc_arm and eclipse_gcc_arm create a makefile. This makefile contains the options for the linker two times:\r\n1st in the LD linker command, 2nd in the LD_FLAGS:\r\n```\r\nLD      = 'arm-none-eabi-gcc' '-Wl,--gc-sections' '-Wl,--wrap,main' '-Wl,--wrap,_malloc_r' '-Wl,--wrap,_free_r' '-Wl,--wrap,_realloc_r' '-Wl,--wrap,_calloc_r' '-Wl,--wrap,exit' '-Wl,--wrap,atexit' '--specs=nano.specs' '-mcpu=cortex-m0plus' '-mthumb' \r\n\r\nLD_FLAGS :=-Wl,--gc-sections -Wl,--wrap,main -Wl,--wrap,_malloc_r -Wl,--wrap,_free_r -Wl,--wrap,_realloc_r -Wl,--wrap,_calloc_r -Wl,--wrap,exit -Wl,--wrap,atexit --specs=nano.specs -mcpu=cortex-m0plus -mthumb \r\n ```\r\n\r\nThen the linker is called:\r\n@$(LD) $(LD_FLAGS)\r\n\r\nFor most flags the double definition is ignored (or better the last one wins), but for the --specs definition the linker complains about already specified specs.\r\n\r\n**Steps to reproduce**\r\nuse export from online compiler to make_gcc or eclipse_gcc_arm project.\r\n\r\nsuggested fix:\r\nuse only LD_FLAGS"},"comment":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/comments/279009181","html_url":"https://github.com/ARMmbed/mbed-os/issues/3744#issuecomment-279009181","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/3744","id":279009181,"user":{"login":"theotherjimmy","id":685409,"avatar_url":"https://avatars.githubusercontent.com/u/685409?v=3","gravatar_id":"","url":"https://api.github.com/users/theotherjimmy","html_url":"https://github.com/theotherjimmy","followers_url":"https://api.github.com/users/theotherjimmy/followers","following_url":"https://api.github.com/users/theotherjimmy/following{/other_user}","gists_url":"https://api.github.com/users/theotherjimmy/gists{/gist_id}","starred_url":"https://api.github.com/users/theotherjimmy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theotherjimmy/subscriptions","organizations_url":"https://api.github.com/users/theotherjimmy/orgs","repos_url":"https://api.github.com/users/theotherjimmy/repos","events_url":"https://api.github.com/users/theotherjimmy/events{/privacy}","received_events_url":"https://api.github.com/users/theotherjimmy/received_events","type":"User","site_admin":false},"created_at":"2017-02-10T17:32:41Z","updated_at":"2017-02-10T17:32:41Z","body":"There you go @JojoS62 #3745 should do the trick. Thanks for reporting this bug!"}}
{"actor":{"display_login":"theotherjimmy"}}