Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade gdc to gdc-8 #8431

Merged
merged 2 commits into from Jul 3, 2018
Merged

Upgrade gdc to gdc-8 #8431

merged 2 commits into from Jul 3, 2018

Conversation

wilzbach
Copy link
Member

@wilzbach wilzbach commented Jul 2, 2018

Trying out @ibuclaw's suggestion of using a special Ubuntu PPA.

@dlang-bot dlang-bot added the WIP Work In Progress - not ready for review or pulling label Jul 2, 2018
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @wilzbach!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "master + dmd#8431"

@wilzbach wilzbach force-pushed the gdc-8 branch 2 times, most recently from 282dd93 to 12a509d Compare July 2, 2018 03:05
@wilzbach wilzbach removed the WIP Work In Progress - not ready for review or pulling label Jul 2, 2018
@wilzbach wilzbach changed the title [WIP] Upgrade gdc to gdc-8 Upgrade gdc to gdc-8 Jul 2, 2018
@wilzbach
Copy link
Member Author

wilzbach commented Jul 2, 2018

Nice - looks like it's working:

image

Note that the build time of the gdc job was already pretty high and is something that can be addressed in another PR (if it's even easy to address):

image

@wilzbach wilzbach added the Blocking Other Work review and pulling should be a priority label Jul 2, 2018
Copy link
Member

@Geod24 Geod24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's pretty ugly, but if it works...

@Geod24 Geod24 requested a review from ibuclaw July 2, 2018 03:37
ci.sh Outdated
mkdir -p ~/dlang/gdc-8
sudo ln -s /usr/bin/gdc-8 /usr/bin/gdc
echo "deactivate(){ echo;}" > ~/dlang/gdc-8/activate
sed -i "s/-vtls //" -i src/posix.mak # gdmd doesn't support -vtls
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then add it to the dmd-script?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry. gdmd already supports it and translates it to -fd-vtls, but it seems like support for it was removed in gdc - the error is simply:

gdc: error: unrecognized command line option ‘-fd-vtls’

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes that ugly option is gone. And replaced with -ftransition=tls. Can add a condition to pick one or the other based on the gcc version.

@wilzbach wilzbach force-pushed the gdc-8 branch 2 times, most recently from 46ab1cb to b31521a Compare July 2, 2018 17:57
ci.sh Outdated
mkdir -p ~/dlang/gdc-8
sudo ln -s /usr/bin/gdc-8 /usr/bin/gdc
echo "deactivate(){ echo;}" > ~/dlang/gdc-8/activate
sed -i "s/-vtls //" -i src/posix.mak # gdc-8 doesn't support -fd-vtls
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow that was pretty fast. Thanks a lot!

ci.sh Outdated
sudo chmod +x /usr/bin/gdmd
# fake install script and create a fake 'activate' script
mkdir -p ~/dlang/gdc-8
sudo ln -s /usr/bin/gdc-8 /usr/bin/gdc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And lastly, if you save the gdmd script to /usr/bin/gdmd-8, you wouldn't need this symlink. I guess you'd need to export DMD=gdmd-8 ?

@ibuclaw
Copy link
Member

ibuclaw commented Jul 2, 2018

@wilzbach - Oops, looks like the compiler was built --with-gcc-major-version-only, fixed that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Blocking Other Work review and pulling should be a priority
Projects
None yet
5 participants