The situation is complicated depending on whether such a country is a net food importer or not. If it is, then slapping import tariffs on food is generally not a good idea, at least in the short run. In fact such countries worry that a reduction in EU subsidies will increase food prices for them; from the (failed) Doha-round talks:
A number of developing countries that depend on imports for their food supply are also concerned about possible rises in world food prices as a result of reductions in richer countries’ subsidies. Although they accepted that higher prices can benefit farmers and increase domestic production, they feel that their concerns about food imports need to be addressed more effectively.
The standing Uruguay agreement has a Decision on Measures Concerning the Possible Negative Effects of the Reform Programme on Least-Developed and Net Food-Importing Developing Countries along the same lines.
During the 2007-2008 food price increases a number of countries have lowered their import tariffs and/or increased their export tariffs (as to keep more food at home):

(There's a breakdown by country in the paper too, it's bit long to include here.) Just the fact that a lot of African countries lowered their food tariffs in this period should be a good indicator. Asian countries reacted more with export tariffs or outright export bans.
Slightly older data on their food balance easily explains why had to do this:
While low-income countries (excluding the oil exporters and conflict countries) as a group have a positive food trade balance, this is mostly due to a few large countries having food trade surpluses. The unweighted net food imports for the 40 low-income countries that were neither oil exporters or in conflict were about -1% to total imports in 2000/2001. This food trade deficit increased to over -2% of their imports by 2004/2005. During the same period, their unweighted food trade deficit increased from -0.5% of their GDPs to -1.0%.

And if you consider a developing country with positive food-trade balance with the EU, e.g. Brazil, their concern is actually the import tariffs of the EU as well the EU subsidies:
In 2015, Brazil’s agri-food
exports to the EU were valued at €13
billion and those from the EU to
Brazil at €1.6 billion. [...] The
main exports from Brazil are animal
feed preparations, coffee, soya beans,
orange juice and various meats (in
particular beef and poultry). The
importance of these products in the
composition of Brazilian exports to
the EU has remained fairly constant
over the last 16 years. As for EU
exports to Brazil, the most important
products in 2015 were whisky, olive
oil, potato and other food preparations,
and fresh fruit. (Ninety-nine per
cent of EU whisky exports were from
the United Kingdom. Clearly, Brexit is
likely to have an impact on this and
other bilateral trade flows between
Brazil and the EU). [...]
The Brazilian economy overall is
subject to relatively high protection,
with an average applied tariff of 13.5
per cent (European Commission,
2016). However, support for the
agricultural sector is considerably
lower, and below that applied by the
EU. As measured by the Nominal
Protection Coefficient (NPC), prices
received by Brazilian farmers are
close to border or world prices
(NPC=1.00), whereas those received
by their counterparts in the EU are,
on average, 6 per cent higher (NPC =
1.06) (OECD, 2016). Brazil has long
been critical of the Common Agricultural
Policy and has sought (along
with others) in the international
arena to have the level of protection
afforded to EU farmers reduced.
A case in point is soya
beans, a major export from Brazil to
the EU. Soya beans enter the EU
tariff-free, but a tariff on processed
soya oil affords protection to EU
crushers and refiners (Nassar et al.,
2007). A similar story applies to
coffee, where the raw product enters
the EU tariff-free, but roasted coffee
is subject to a 7.5 per cent tariff. In
short, low value-added agricultural
commodities exported from Brazil to
the EU face much lower tariffs than
those that apply to the processed
derivatives. This encourages the
exporting of agricultural commodities,
but makes it more difficult for Brazil
to compete in the EU markets for
higher value-added products.
So basically, you have this backwards, it's the [developing] countries which export food to the EU who would like to see the EU subsidies scrapped.
Of course, saying what the net food importers did is much easier than what they should do in response to price increases (or somewhat equivalently, whether they should increase tariffs). I think the academic debate in this area is still being hotly contested. E.g.
Five-person household living in Bangladesh on one-dollar-a-day per person spends its $5
– $3 on food
– $0.50 on household energy
– $1.50 on non-foods
• A 50% increase in food and energy prices cuts $1.75 from their expenditures
• Food expenditures will be cut most, and will be accompanied by:
– Reduced diet quality
– Increased micronutrient malnutrition, increasing probability of developmental damage
Source: Based on von Braun (2008)
Aksoy and Isik-Dikmelik (2008)
– Based on household surveys for nine countries, agrees there are more poor net food buyers than sellers
– But suggests that half these households are marginal net food sellers, thus price increases will have small impacts on their welfare
– Notes that the average incomes are net food buyers are higher than the average incomes of net food sellers, so higher food prices transfer income from
rich buyers to poorer sellers and thus are ‘pro-poor’.
– Note that policies of low food prices in developing countries (e.g. through rural taxation) penalised agriculture to the detriment of overall economic
growth
And considering such effects on a group of countries, still leaves the issue that there may be substantial heterogeneity between such countries in the distribution of net buyers and sellers foods:
