China National Chemical Corporation (ChemChina) has agreed to buy Italy's Pirelli, the world's fifth-largest tyre manufacturer, in a deal valued at EUR7.1bn (US$7.7bn).